use thiserror::Error;

#[derive(Error, Debug)]
pub enum JottamError {
    #[error("API Request Failed: {0}")]
    ApiError(String),

    #[error("Encryption Error: {0}")]
    EncryptionError(String),

    #[error("Decryption Error: {0}")]
    DecryptionError(String),

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

    #[error("Not Found: {0}")]
    NotFound(String),

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

    #[error("Internal Error: {0}")]
    Internal(String),

    #[error("Unknown error occurred")]
    Unknown,
}

pub type Result<T> = std::result::Result<T, JottamError>;
