libits/client/configuration/
configuration_error.rs1use thiserror::Error;
13
14#[derive(Error, Debug)]
15pub enum ConfigurationError {
16 #[error("{0}")]
17 BootstrapFailure(String),
18 #[error("Could not found field '{0}'")]
19 FieldNotFound(&'static str),
20 #[error("Cannot parse '{0}' due to invalid file type")]
21 InvalidFileType(String),
22 #[error("Configuration missing mandatory field {0} in section {1}")]
23 MissingMandatoryField(&'static str, &'static str),
24 #[error("Configuration missing mandatory section: {0}")]
25 MissingMandatorySection(&'static str),
26 #[error("No custom settings found in configuration")]
27 NoCustomSettings,
28 #[error("Could not found section '{0}'")]
29 SectionNotFound(&'static str),
30 #[error("Could not parse value of field '{0}' as a '{1}'")]
31 TypeError(&'static str, &'static str),
32 #[error("Username provided with no password")]
33 NoPassword,
34}