use crate::{traits::ErrorTrait, AnyError};
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error(transparent)]
    Any(#[from] AnyError),

    #[error(transparent)]
    Config(#[from] soph_config::error::Error),

    #[error("{0}")]
    Message(String),

    #[error(transparent)]
    Reqwest(#[from] reqwest::Error),

    #[error(transparent)]
    ReqwestMiddleware(#[from] reqwest_middleware::Error),
}

impl ErrorTrait for Error {}
