1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5 #[error("IO error: {0}")]
6 Io(#[from] std::io::Error),
7
8 #[error("Storage error: {0}")]
9 Storage(String),
10
11 #[error("Validation error: {0}")]
12 Validation(String),
13
14 #[error("Manifest error: {0}")]
15 Manifest(String),
16
17 #[error("Signing error: {0}")]
18 Signing(String),
19
20 #[error("Serialization error: {0}")]
21 Serialization(String),
22
23 #[error("Initialization error: {0}")]
24 InitializationError(String),
25
26 #[error("Hex decode error: {0}")]
27 HexDecode(#[from] hex::FromHexError),
28
29 #[error("CC Attestation error: {0}")]
30 CCAttestationError(String),
31
32 #[error("JSON error: {0}")]
33 Json(#[from] serde_json::Error),
34}
35
36pub type Result<T> = std::result::Result<T, Error>;