1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum StorageError {
5 #[error("RPC error: {0}")]
6 Rpc(#[from] sdkt_rpc::error::RpcError),
7 #[error("Contract ID not found")]
8 ContractNotFound,
9 #[error("Invalid contract ID: {0}")]
10 InvalidContractId(String),
11 #[error("Snapshot contract ID mismatch: old '{old}' vs new '{new}'")]
12 ContractIdMismatch { old: String, new: String },
13 #[error("Parsing error: {0}")]
14 Parse(String),
15 #[error("IO error: {0}")]
16 Io(#[from] std::io::Error),
17 #[error("Not found: {0}")]
18 NotFound(String),
19 #[error("no default identity set; choose one with `sdkt identity default <name>`")]
20 NoDefaultIdentity,
21 #[error("Corrupt cache data: {0}")]
22 CorruptCache(String),
23 #[error("Config error: {0}")]
24 ConfigError(String),
25}