#[derive(Debug, thiserror::Error)]
pub enum StorageError {
#[error("storage: not found: {0}")]
NotFound(String),
#[error("storage: io error: {0}")]
Io(String),
#[error("storage: backend error: {0}")]
Backend(String),
#[error("storage: config error: {0}")]
Config(String),
#[error("storage: invalid signature: {0}")]
InvalidSignature(String),
#[error("storage: database error: {0}")]
Db(String),
}
impl From<std::io::Error> for StorageError {
fn from(e: std::io::Error) -> Self {
StorageError::Io(e.to_string())
}
}