ic_asset/error/
upload_content.rs1use crate::error::create_project_asset::CreateProjectAssetError;
2use crate::error::gather_asset_descriptors::GatherAssetDescriptorsError;
3use crate::error::get_asset_properties::GetAssetPropertiesError;
4use ic_agent::AgentError;
5use thiserror::Error;
6
7use super::AssembleCommitBatchArgumentError;
8
9#[derive(Error, Debug)]
11pub enum UploadContentError {
12 #[error("Failed to assemble commit_batch argument")]
14 AssembleCommitBatchArgumentFailed(#[source] AssembleCommitBatchArgumentError),
15
16 #[error("Failed to create batch")]
18 CreateBatchFailed(#[source] AgentError),
19
20 #[error("Failed to create project asset")]
22 CreateProjectAssetError(#[from] CreateProjectAssetError),
23
24 #[error("Failed to gather asset descriptors")]
26 GatherAssetDescriptorsFailed(#[from] GatherAssetDescriptorsError),
27
28 #[error(transparent)]
30 GetAssetPropertiesFailed(#[from] GetAssetPropertiesError),
31
32 #[error("Failed to list assets")]
34 ListAssetsFailed(#[source] AgentError),
35}