aeat.domain.currency._errors module¶
Domain error hierarchy for currency normalization and exchange-rate lookup.
All exceptions extend AeatError so callers can
catch either the domain-specific type or the project-wide base class.
- exception CurrencyError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase exception for currency normalization.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception MissingExchangeRateError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CurrencyErrorRaised when an exchange rate is missing for a given date/currency.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception UnsupportedCurrencyError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CurrencyErrorRaised when an unknown currency code is encountered.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ExchangeRateProviderError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CurrencyErrorRaised when an upstream exchange-rate adapter fails to respond.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception StaleExchangeRateError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CurrencyErrorRaised when the only available rate is outside the acceptable freshness window.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶