from infrastructure.http_retry import TransientHttpError class EpcApiError(Exception): """Base for all EPC client errors.""" class EpcNotFoundError(EpcApiError): """Raised when the API returns 404.""" class EpcRateLimitError(EpcApiError, TransientHttpError): """Raised when the API returns 429. A ``TransientHttpError`` so the shared ``call_with_retry`` retries it (honouring ``Retry-After``), while remaining an ``EpcApiError`` for callers that catch the EPC hierarchy."""