"""Domain error hierarchy for currency normalization and exchange-rate lookup.All exceptions extend :class:`~aeat.core.errors.AeatError` so callers cancatch either the domain-specific type or the project-wide base class."""from...core.errorsimportAeatError
[docs]classCurrencyError(AeatError):"""Base exception for currency normalization."""
[docs]classMissingExchangeRateError(CurrencyError):"""Raised when an exchange rate is missing for a given date/currency."""
[docs]classUnsupportedCurrencyError(CurrencyError):"""Raised when an unknown currency code is encountered."""
[docs]classExchangeRateProviderError(CurrencyError):"""Raised when an upstream exchange-rate adapter fails to respond."""
[docs]classStaleExchangeRateError(CurrencyError):"""Raised when the only available rate is outside the acceptable freshness window."""