guts_git/
error.rs

1//! Git protocol error types.
2
3use thiserror::Error;
4
5/// Errors that can occur during git protocol operations.
6#[derive(Debug, Error)]
7pub enum GitError {
8    /// Invalid pack file format.
9    #[error("invalid pack file: {0}")]
10    InvalidPack(String),
11
12    /// Invalid pkt-line format.
13    #[error("invalid pkt-line: {0}")]
14    InvalidPktLine(String),
15
16    /// Protocol error.
17    #[error("protocol error: {0}")]
18    Protocol(String),
19
20    /// Object not found.
21    #[error("object not found: {0}")]
22    ObjectNotFound(String),
23
24    /// Storage error.
25    #[error("storage error: {0}")]
26    Storage(#[from] guts_storage::StorageError),
27
28    /// I/O error.
29    #[error("I/O error: {0}")]
30    Io(#[from] std::io::Error),
31}