cadrumo.domain.iva.errors module¶
Canonical domain errors for the cadrumo.domain.iva subpackage.
Every failure mode raised by the IVA substrate inherits from
IvaError, which in turn inherits from
cadrumo.core.errors.hierarchy.CadrumoError. Downstream callers catch the base class
when they want to treat the substrate as an opaque unit, or the specific
subclass when they need to distinguish missing-rate from missing-category or
corpus load failures.
- exception IvaError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorBase error for every
cadrumo.domain.ivafailure mode.- Parameters:
- Return type:
None
- code¶
- exception IvaRateNotFoundError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorRaised when
cadrumo.domain.iva.lookup.lookup_rate()cannot resolve a rate.The lookup fails either because the requested member state is absent from
cadrumo.domain.iva.rates.load_iva_rate_table(), because no rate of the requestedcadrumo.domain.iva.schema.IvaRateKindis registered for that member state, or because every registered rate’s effective window excludes the requested date.- Parameters:
- Return type:
None
- code¶
- exception IvaCategoryNotFoundError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorRaised when a lookup against a resolved IVA catalogue misses.
- Parameters:
- Return type:
None
- code¶
- exception IvaCatalogueError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorRaised when an IVA catalogue cannot be loaded, resolved, or validated.
- Parameters:
- Return type:
None
- code¶
- exception IvaRateOverlapError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorRaised when two
cadrumo.domain.iva.schema.IvaRateRecordrecords share a window.The substrate enforces that for every
(member_state, kind)partition ofcadrumo.domain.iva.rates.load_iva_rate_table()no two records have overlappingeffective_from/effective_untilranges. Adding a new record that violates this invariant raises this error at module import time so the regression surfaces in CI rather than silently affectingcadrumo.domain.iva.lookup.lookup_rate()results.- Parameters:
- Return type:
None
- code¶
- exception IvaValidationError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorRaised on invalid IVA field values.
Its canonical registered ancestry is
IvaError. Pydantic validators translate this registered failure toValueErrorat their narrow boundary.- Parameters:
- Return type:
None
- code¶
- exception ProrrataError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
IvaErrorBase error for IVA prorrata calculation failures (LIVA arts. 101-103).
- Parameters:
- Return type:
None
- code¶
- exception ProrrataInputError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
ProrrataErrorRaised when prorrata inputs violate domain invariants.
Its canonical registered ancestry is
ProrrataError. Pydantic model validators translate this registered failure toValueErrorat their narrow boundary.- Parameters:
- Return type:
None
- code¶