"""Custom exceptions for ZeptoMail."""


class ZeptoMailError(Exception):
    """Base exception for all ZeptoMail errors."""


class MimeTypeError(ZeptoMailError, TypeError):
    """Raised when an invalid or unsupported MIME type is used."""


class ZeptoMailAPIError(ZeptoMailError):
    """Raised when the ZeptoMail API returns a non-success response.

    Attributes:
        status_code: HTTP status code from the API response.
        response_body: Parsed JSON body (or raw text) from the API response.
    """

    def __init__(self, message: str, status_code: int, response_body=None):
        self.status_code = status_code
        self.response_body = response_body
        super().__init__(message)
