"""Custom exceptions for Tab SDK."""


class TabError(Exception):
    """Base exception for Tab SDK errors."""

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


class InsufficientBalanceError(TabError):
    """Raised when agent has insufficient balance for a payment."""

    pass


class InvalidPaymentError(TabError):
    """Raised when a payment token is invalid or expired."""

    pass


class AuthenticationError(TabError):
    """Raised when API key is invalid."""

    pass
