"""SmaugLabs SDK exceptions."""

from __future__ import annotations

from typing import Any


class SmaugLabsError(Exception):
    """Base exception for all SmaugLabs API errors."""

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


class AuthenticationError(SmaugLabsError):
    """Raised when the API key is missing, invalid, or expired."""


class RateLimitError(SmaugLabsError):
    """Raised when the rate limit is exceeded. Back off and retry."""
