use super::AssembleCommitBatchArgumentError;
use crate::error::compatibility::CompatibilityError;
use crate::error::create_project_asset::CreateProjectAssetError;
use ic_agent::AgentError;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum UploadError {
#[error("Failed to query asset canister API version")]
ApiVersionQueryFailed(#[source] AgentError),
#[error("Commit batch failed")]
CommitBatchFailed(#[source] AgentError),
#[error(transparent)]
Compatibility(#[from] CompatibilityError),
#[error("Create batch failed")]
CreateBatchFailed(#[source] AgentError),
#[error("Failed to assemble commit_batch argument")]
AssembleCommitBatchArgumentFailed(#[from] AssembleCommitBatchArgumentError),
#[error("Failed to create project asset")]
CreateProjectAssetFailed(#[from] CreateProjectAssetError),
#[error("List assets failed")]
ListAssetsFailed(#[source] AgentError),
}