commit_bridge/repository/error.rs
1//! Error types for repository operation failures.
2
3/// An error in a repository.
4#[derive(thiserror::Error, Debug)]
5pub enum RepositoryError {
6 /// Requested resource not found.
7 #[error("Resource not found")]
8 NotFound,
9
10 /// Database operation error.
11 #[error("Database error: {0}")]
12 Database(#[from] sqlx::Error),
13
14 /// Data mapping error.
15 #[error("Data mapping error: {0}")]
16 Mapping(String),
17}