"""Custom exceptions for the football-data.org API client."""

from __future__ import annotations


class FootballAPIError(Exception):
    """Base exception for all football-data.org API errors."""

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


class AuthenticationError(FootballAPIError):
    """Raised when the API token is missing or invalid (HTTP 403)."""


class NotFoundError(FootballAPIError):
    """Raised when the requested resource does not exist (HTTP 404)."""


class RateLimitError(FootballAPIError):
    """Raised when the API rate limit is exceeded (HTTP 429)."""


class ServerError(FootballAPIError):
    """Raised on unexpected server-side errors (HTTP 5xx)."""
