1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum Error {
8 #[error("Invalid input: {0}")]
9 InvalidInput(String),
10
11 #[error("IO error: {0}")]
12 Io(#[from] std::io::Error),
13
14 #[error("Serialization error: {0}")]
15 Serialization(String),
16
17 #[error("Network error: {0}")]
18 Network(String),
19
20 #[error("Service unavailable: {0}")]
21 ServiceUnavailable(String),
22
23 #[error("Internal error: {0}")]
24 Internal(String),
25
26 #[error("Prometheus error: {0}")]
27 Prometheus(String),
28}
29
30pub type Result<T> = std::result::Result<T, Error>;