1use super::AssembleCommitBatchArgumentError;
2use crate::error::compatibility::CompatibilityError;
3use crate::error::create_project_asset::CreateProjectAssetError;
4use ic_agent::AgentError;
5use thiserror::Error;
6
7#[derive(Error, Debug)]
9pub enum UploadError {
10 #[error("Failed to query asset canister API version")]
12 ApiVersionQueryFailed(#[source] AgentError),
13
14 #[error("Commit batch failed")]
16 CommitBatchFailed(#[source] AgentError),
17
18 #[error(transparent)]
20 Compatibility(#[from] CompatibilityError),
21
22 #[error("Create batch failed")]
24 CreateBatchFailed(#[source] AgentError),
25
26 #[error("Failed to assemble commit_batch argument")]
28 AssembleCommitBatchArgumentFailed(#[from] AssembleCommitBatchArgumentError),
29
30 #[error("Failed to create project asset")]
32 CreateProjectAssetFailed(#[from] CreateProjectAssetError),
33
34 #[error("List assets failed")]
36 ListAssetsFailed(#[source] AgentError),
37}