pub type StorageResult<T> = Result<T, StorageError>;

#[derive(Debug, thiserror::Error)]
pub enum StorageError {
    #[error("storage config error: {0}")]
    Config(String),
    #[error("invalid storage key: {0}")]
    InvalidKey(String),
    #[error("storage object not found: {0}")]
    NotFound(String),
    #[error("local storage error: {0}")]
    Local(String),
    #[error("s3 error: {0}")]
    S3(String),
    #[error("stream error: {0}")]
    Stream(String),
}
