1use crate::credential::error::{InvalidCredentialError, VerificationError};
2use axone_rdf::serde::NQuadsReadError;
3use cosmwasm_std::{Instantiate2AddressError, StdError};
4use cw_utils::PaymentError;
5use thiserror::Error;
6
7#[derive(Error, Debug)]
8pub enum ContractError {
9 #[error("{0}")]
10 Std(#[from] StdError),
11
12 #[error("{0}")]
13 Instantiate2Address(#[from] Instantiate2AddressError),
14
15 #[error("Couldn't parse RDF: '{0}'")]
16 ParseRDF(#[from] NQuadsReadError),
17
18 #[error("Invalid credential: '{0}'")]
19 InvalidCredential(#[from] InvalidCredentialError),
20
21 #[error("Credential verification failed: '{0}'")]
22 CredentialVerification(#[from] VerificationError),
23
24 #[error("Credential not supported: '{0}'")]
25 UnsupportedCredential(String),
26
27 #[error("Credential already exists: '{0}'")]
28 CredentialAlreadyExists(String),
29
30 #[error("An unexpected error occurred: {0}")]
31 Unexpected(String),
32
33 #[error("{0}")]
34 Payment(#[from] PaymentError),
35}