platform/error/
config_error.rs1use thiserror::Error;
6
7#[derive(Error, Debug)]
9pub enum ConfigError {
10 #[error("Invalid configuration format: {message}")]
11 InvalidFormat { message: String },
12
13 #[error("Missing required field: {field}")]
14 MissingField { field: String },
15
16 #[error("Invalid value for field '{field}': {value}")]
17 InvalidValue { field: String, value: String },
18
19 #[error("Configuration file not found: {path}")]
20 FileNotFound { path: String },
21
22 #[error("Failed to parse configuration: {source}")]
23 ParseError {
24 #[source]
25 source: Box<dyn std::error::Error + Send + Sync>,
26 },
27
28 #[error("Environment variable error: {var}")]
29 EnvError { var: String },
30}