"""
Custom exceptions for exchange-data-manager client.
"""


class EdmError(Exception):
    """Base exception for edm client errors."""
    pass


class EdmConnectionError(EdmError):
    """Failed to connect to edm service."""
    pass


class EdmTimeoutError(EdmError):
    """Request to edm timed out."""
    pass


class EdmApiError(EdmError):
    """edm returned an error response."""

    def __init__(self, status_code: int, message: str):
        self.status_code = status_code
        self.message = message
        super().__init__(f"EDM API Error ({status_code}): {message}")
