use mailparse::MailParseError;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum ServerError {
    #[error("notmuch")]
    NotmuchError(#[from] notmuch::NotmuchError),
    #[error("flatten")]
    FlattenError,
    #[error("mail parse error")]
    MailParseError(#[from] MailParseError),
    #[error("IO error")]
    IoError(#[from] std::io::Error),
    #[error("attachement not found")]
    PartNotFound,
}
