aeat.domain.deadlines._errors module¶
Domain errors for the aeat.domain.deadlines subpackage.
Every error inherits from aeat.core.errors.AeatError so callers have
a single root they can catch when integrating with the deadline engine.
- exception DeadlineError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase class for every error raised by
aeat.domain.deadlines.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ProfileError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
DeadlineErrorRaised when an
aeat.domain.deadlines.TaxpayerProfilecannot be loaded or validated.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ScheduleComputationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
DeadlineErrorRaised when the engine cannot produce a valid schedule.
Often caused by a mismatch between the requested year and the registry’s coverage, or by profile facts that trigger an unknown modelo.
Two structurally distinct failure classes share this type: the benign “no registry deadline windows registered” data gap — raised as the
NoDeadlineWindowsErrorsubclass so callers can degrade gracefully around it — and genuine registry-integrity faults (validation failure, profile-condition evaluation failure), raised as the bareScheduleComputationError. A caller that wants the benign degradation must catch the narrowNoDeadlineWindowsError, never the broad base, so a genuine fault propagates instead of being masked.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception NoDeadlineWindowsError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
ScheduleComputationErrorRaised when the registry has no deadline windows for a year/modelo.
This is the benign schedule-computation failure: a registry-track data gap (the Modelo 100 / 303 / 347 / 202 windows not yet registered — round-3 finding R1), not a corrupt or invalid registry. The overview calendar / agenda / explain surfaces catch this narrow subtype to degrade gracefully — a year or modelo with no window data contributes zero entries while the surface still answers for everything that does have data.
It is deliberately distinct from the bare
ScheduleComputationError, which the engine raises for a genuine registry-integrity fault (validation failure, profile-condition evaluation failure). Catching only this subtype lets those genuine faults propagate and surface instead of being silently swallowed.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception DeadlineValidationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
DeadlineError,ValueErrorRaised when deadline records violate state or shape invariants.
Inherits from ValueError to maintain compatibility with Pydantic validators.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶