| 1 | //! Errors from the git wire-protocol layer. |
| 2 | |
| 3 | /// Errors produced while serving the git smart protocol. |
| 4 | #[derive(Debug, thiserror::Error)] |
| 5 | pub enum Error { |
| 6 | /// An error from the underlying protocol engine (`gitserver-core`). |
| 7 | #[error(transparent)] |
| 8 | Core(#[from] gitserver_core::error::Error), |
| 9 | |
| 10 | #[error(transparent)] |
| 11 | Io(#[from] std::io::Error), |
| 12 | |
| 13 | /// An error reading repository contents via gix (browse layer). |
| 14 | #[error("git read error: {0}")] |
| 15 | Read(String), |
| 16 | } |
| 17 | |
| 18 | pub type Result<T> = std::result::Result<T, Error>; |