use thiserror::Error;

/// Errors returned by temp-mail.org API operations.
#[derive(Debug, Error)]
pub enum Error {
    /// An underlying HTTP or protocol error from `reqwest`.
    #[error(transparent)]
    Reqwest(#[from] reqwest::Error),
    /// The mailbox token could not be placed in an HTTP header because it contained non-ASCII characters.
    #[error("mailbox token contains non-ASCII characters: {0}")]
    NonAsciiMailboxToken(String),
}
