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