use thiserror::Error;
use crate::digest::DigestParseError;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum BlobStoreError {
#[error("io: {0}")]
Io(#[from] std::io::Error),
#[error("digest mismatch on put: caller said {expected}, computed {computed}")]
DigestMismatch {
expected: String,
computed: String,
},
#[error("blob not found: {0}")]
NotFound(String),
#[error("invalid digest: {0}")]
InvalidDigest(#[from] DigestParseError),
}