ggen_config/receipt/
error.rs1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, ReceiptError>;
7
8#[derive(Debug, Error)]
10pub enum ReceiptError {
11 #[error("Signature verification failed")]
13 InvalidSignature,
14
15 #[error("Chain verification failed: {0}")]
17 InvalidChain(String),
18
19 #[error("Serialization error: {0}")]
21 Serialization(#[from] serde_json::Error),
22
23 #[error("Invalid receipt: {0}")]
25 InvalidReceipt(String),
26
27 #[error("Cryptographic error: {0}")]
29 Crypto(String),
30
31 #[error("Hash mismatch: expected {expected}, got {actual}")]
33 HashMismatch {
34 expected: String,
36 actual: String,
38 },
39}