pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("redis error: {0}")]
Redis(#[from] redis::RedisError),
#[error("json error: {0}")]
Json(#[from] serde_json::Error),
#[error("yaml error: {0}")]
Yaml(#[from] serde_yaml::Error),
#[error("http error: {0}")]
Http(#[from] reqwest::Error),
#[error("url parse error: {0}")]
Url(#[from] url::ParseError),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("schema validation error: {0}")]
SchemaValidation(String),
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("unsupported feature: {0}")]
Unsupported(&'static str),
}