use thiserror::Error as ThisError;
#[non_exhaustive]
#[derive(ThisError, Debug)]
pub enum ConfigError {
#[error("Error: {0}")]
BotError(#[from] crate::error::Error),
#[error("Parsoid Error: {0}")]
ParsoidError(#[from] parsoid::Error),
#[error("Cannot find config directory")]
CannotFindConfig,
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("Invalid TOML: {0}")]
InvalidTOML(#[from] toml::de::Error),
#[error("Configuration is readable by other users: {0}")]
ReadableConfig(#[from] fs_mistrust::Error),
#[error("At least both of api_url and rest_url, or the wiki_url, must be specified")]
MissingSiteURL,
}