1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum StorageError {
8 #[error("object not found: {0}")]
10 ObjectNotFound(String),
11
12 #[error("reference not found: {0}")]
14 RefNotFound(String),
15
16 #[error("repository not found: {0}")]
18 RepoNotFound(String),
19
20 #[error("repository already exists: {0}")]
22 RepoExists(String),
23
24 #[error("invalid object: {0}")]
26 InvalidObject(String),
27
28 #[error("invalid reference: {0}")]
30 InvalidRef(String),
31
32 #[error("compression error: {0}")]
34 Compression(String),
35
36 #[error("I/O error: {0}")]
38 Io(#[from] std::io::Error),
39}