sigillum_core/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum VaultError {
5 #[error("vault is locked")]
6 Locked,
7
8 #[error("key not found: {0}")]
9 NotFound(String),
10
11 #[error("encryption failed: {0}")]
12 Encryption(String),
13
14 #[error("decryption failed: {0}")]
15 Decryption(String),
16
17 #[error("io error: {0}")]
18 Io(#[from] std::io::Error),
19
20 #[error("serialization error: {0}")]
21 Serialization(#[from] serde_json::Error),
22
23 #[error("{0}")]
24 Other(String),
25}