Skip to main content

ic_asset/error/
prepare_sync_for_proposal.rs

1use crate::error::upload_content::UploadContentError;
2use ic_agent::AgentError;
3use thiserror::Error;
4
5/// Errors related to preparing synchronization operations for a proposal.
6#[derive(Error, Debug)]
7pub enum PrepareSyncForProposalError {
8    /// Failed when querying the asset canister for its API version.
9    #[error("Failed to query asset canister API version")]
10    ApiVersionQueryFailed(#[source] AgentError),
11
12    /// Failed while requesting that the asset canister compute evidence.
13    #[error("Failed to compute evidence")]
14    ComputeEvidence(#[source] AgentError),
15
16    /// Failed while calling propose_commit_batch.
17    #[error("Failed to propose batch to commit")]
18    ProposeCommitBatch(#[source] AgentError),
19
20    /// Failed while uploading content for synchronization.
21    #[error(transparent)]
22    UploadContent(#[from] UploadContentError),
23}