aeat.domain.iva_compensation._errors module¶
Typed error classes for the IVA-compensation domain.
These guard-violation errors are raised by the pure carry-forward,
reconciliation, and balance logic. Each inherits from both
AeatError (so the failure reaches the typed error
registry with a stable code and structured context) and ValueError (so
scalar validation and coercion failures retain the standard Python error
category).
- exception IvaCompensationCarryForwardPolicyError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when IVA compensation carry-forward lots violate policy.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaCompensationSeedConflictError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when a seed is attempted for a period that already has a stored state.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaCompensationYearRangeError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when a filing_year or as_of_year falls outside the supported range [2000, 2099].
Replaces bare
ValueErrorat the year-range guards iniva_compensation_period_key()andbuild_iva_compensation_carry_forward_report(). Inherits fromValueErrorbecause these guards validate caller-supplied scalar year values while still surfacing a typed AEAT error.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaCompensationDecimalParseError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when a casilla value cannot be coerced to
Decimal.Replaces the bare
ValueErrorre-raised fromInvalidOperationinside the casilla-decimal coercion helper. Inherits fromValueErrorbecause it reports a scalar coercion failure and chains the originalInvalidOperationcause.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaCompensationCasillaReferenceError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when IVA compensation input uses a noncanonical casilla reference.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaCompensationReconciliationInputError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when IVA compensation wallet reconciliation inputs are invalid.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception IvaWalletReconciliationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CoreErrorRaised when an IVA wallet reconciliation invariant is violated.
Covers pre-condition checks on the reconciliation inputs that fall outside pydantic model validation — for example, a negative
max_wallet_age_daysargument supplied to the staleness predicate. Raising a typedCoreErrorsubclass instead of a bareValueErrorensures the failure propagates through the error registry and produces a structured envelope with a stable error code.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶