1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, Error>;
4
5#[derive(Error, Debug)]
6pub enum Error {
7 #[error("IO error: {0}")]
8 Io(#[from] std::io::Error),
9
10 #[error("HTTP error: {0}")]
11 Http(#[from] reqwest::Error),
12
13 #[error("Serialization error: {0}")]
14 Serde(#[from] serde_json::Error),
15
16 #[error("YAML error: {0}")]
17 Yaml(#[from] serde_yaml::Error),
18
19 #[error("Regex error: {0}")]
20 Regex(#[from] regex::Error),
21
22 #[error("Parse error: {0}")]
23 Parse(String),
24
25 #[error("Chunk creation error: {0}")]
26 ChunkCreation(String),
27
28 #[error("Registry error: {0}")]
29 Registry(String),
30
31 #[error("Metadata extraction error: {0}")]
32 Metadata(String),
33
34 #[error("Transformation error: {0}")]
35 Transform(String),
36
37 #[error("Fetching error: {0}")]
38 Fetch(String),
39
40 #[error("Configuration error: {0}")]
41 Config(String),
42
43 #[error("Invalid input: {0}")]
44 InvalidInput(String),
45
46 #[error("Not found: {0}")]
47 NotFound(String),
48
49 #[error("Unsupported format: {0}")]
50 UnsupportedFormat(String),
51}