1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum DaemonError {
8 #[error("Failed to bind to socket: {0}")]
10 BindFailed(String),
11
12 #[error("Failed to acquire lock: {0}")]
14 LockFailed(String),
15
16 #[error("grite error: {0}")]
18 Core(#[from] libgrite_core::GriteError),
19
20 #[error("Git error: {0}")]
22 Git(#[from] libgrite_git::GitError),
23
24 #[error("IPC error: {0}")]
26 Ipc(#[from] libgrite_ipc::IpcError),
27
28 #[error("IO error: {0}")]
30 Io(#[from] std::io::Error),
31
32 #[error("JSON error: {0}")]
34 Json(#[from] serde_json::Error),
35
36 #[error("Invalid state transition from {from} to {to}")]
38 InvalidStateTransition { from: String, to: String },
39}