1use thiserror::Error as ThisError;
19
20#[non_exhaustive]
22#[derive(ThisError, Debug)]
23pub enum ConfigError {
24 #[error("Error: {0}")]
25 BotError(#[from] crate::error::Error),
26 #[error("Parsoid Error: {0}")]
27 ParsoidError(#[from] parsoid::Error),
28 #[error("Cannot find config directory")]
29 CannotFindConfig,
30 #[error("I/O error: {0}")]
31 IoError(#[from] std::io::Error),
32 #[error("Invalid TOML: {0}")]
33 InvalidTOML(#[from] toml::de::Error),
34 #[error("Configuration is readable by other users: {0}")]
35 ReadableConfig(#[from] fs_mistrust::Error),
36 #[error("At least both of api_url and rest_url, or the wiki_url, must be specified")]
37 MissingSiteURL,
38 #[error("Cannot use clone_for_family with a BotPassword, switch to an OAuth token")]
39 CannotCloneBotPassword,
40 #[cfg(feature = "sitematrix")]
41 #[error("Cannot find the provided sitename: {0}")]
42 InvalidSitename(String),
43}