Skip to content

# Exceptions

## `` mail_intake.exceptions

Exception hierarchy for Mail Intake.

#### Summary

This module defines the canonical exception types used throughout the Mail Intake library.

All library-raised errors derive from `MailIntakeError`. Consumers are encouraged to catch this base type (or specific subclasses) rather than provider-specific or third-party exceptions.

### Classes

#### `` MailIntakeAdapterError

Bases: `MailIntakeError`

Errors raised by mail provider adapters.

Notes

Lifecycle:

    1
    2

    - Raised when a provider adapter encounters API errors, transport
      failures, or invalid provider responses.

#### `` MailIntakeAuthError

Bases: `MailIntakeError`

Authentication and credential-related failures.

Notes

Lifecycle:

    1
    2

    - Raised when authentication providers are unable to acquire,
      refresh, or persist valid credentials.

#### `` MailIntakeError

Bases: `Exception`

Base exception for all Mail Intake errors.

Notes

Guarantees:

    1
    2
    3

    - This is the root of the Mail Intake exception hierarchy
    - All errors raised by the library must derive from this class
    - Consumers should generally catch this type when handling library-level failures

#### `` MailIntakeParsingError

Bases: `MailIntakeError`

Errors encountered while parsing message content.

Notes

Lifecycle:

    1
    2

    - Raised when raw provider payloads cannot be interpreted or
      normalized into internal domain models.