#[non_exhaustive]pub enum ConfigError {
NotFound,
ReadError {
path: PathBuf,
source: Error,
},
ParseError {
source: Error,
},
ValidationError {
field: String,
message: String,
},
MissingEnvVar {
name: String,
},
MultipleErrors {
errors: Vec<ConfigError>,
},
}Expand description
Errors that occur while loading or validating FraiseQL configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
No configuration file was found at the expected location(s).
ReadError
The configuration file was found but could not be read from disk.
ParseError
The configuration file was read successfully but contains invalid TOML or does not conform to the expected schema.
ValidationError
A configuration value failed a semantic validation rule (e.g. a port number that is out of range, or conflicting options).
Fields
MissingEnvVar
A required environment variable was not set at startup.
MultipleErrors
Several configuration errors were collected together (e.g. during a full-file validation pass) and are reported as a single error.
Fields
errors: Vec<ConfigError>All individual errors that were encountered.
Implementations§
Source§impl ConfigError
impl ConfigError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Returns a short, stable error code string suitable for API responses and structured logging.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()