1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum GriteError {
6 #[error("grite command failed: {0}")]
8 CommandFailed(String),
9
10 #[error("not found: {0}")]
12 NotFound(String),
13
14 #[error("parse error: {0}")]
16 ParseError(String),
17
18 #[error("unexpected response: {0}")]
20 UnexpectedResponse(String),
21
22 #[error("invalid ID format: {0}")]
24 InvalidId(String),
25
26 #[error("invalid state transition: {0}")]
28 InvalidStateTransition(String),
29
30 #[error("json error: {0}")]
32 Json(#[from] serde_json::Error),
33
34 #[error("io error: {0}")]
36 Io(#[from] std::io::Error),
37}