use thiserror::Error;
#[derive(Debug, Error)]
pub enum TakoyakiError {
#[error("Error while reading file: ")]
ReadError(#[from] std::io::Error),
#[error("Error while parsing data")]
ParseError(#[from] serde_json::Error),
#[error("Invalid config found")]
ConfigParseError(#[from] serde_yaml::Error),
#[error("Invalid hex code: Cannot convert to rgb")]
RgbParseError(#[from] colorsys::ParseError),
#[error("Invalid root found: `{0}`")]
InvalidRoot(String),
#[error("Invalid root found! Expected: `{0}`")]
UnexpectedType(String),
#[error("Root cannot be found: `{0}`")]
RootNotFound(String),
#[error("Error while fetching URL")]
ReqwestError(#[from] reqwest::Error),
}