1use thiserror::Error;
2
3#[derive(Debug, Error)]
5#[cfg_attr(feature = "ffi", derive(uniffi::Error))]
6#[cfg_attr(feature = "ffi", uniffi(flat_error))]
7pub enum WalletKitError {
8 #[error("invalid_input")]
10 InvalidInput,
11 #[error("invalid_number")]
13 InvalidNumber,
14 #[error("serialization_error: {0}")]
16 SerializationError(String),
17 #[error("network_error: {0}")]
19 NetworkError(String),
20 #[error(transparent)]
22 Reqwest(#[from] reqwest::Error),
23 #[error(transparent)]
25 ProofGeneration(#[from] semaphore_rs::protocol::ProofError),
26 #[error("semaphore_not_enabled")]
28 SemaphoreNotEnabled,
29 #[error("credential_not_issued")]
31 CredentialNotIssued,
32}