aeat.core.access_gate._errors module¶
Policy errors for the AEAT live-access gate.
All errors inherit from core.errors.AeatError so callers
have a single root they can catch at integration boundaries.
LiveSubmitForbiddenError lives here (rather than in the
adapters/outbound/aeat/export layer) because:
The gate module (
core/access_gate/) raises it, andcore/must remain independent from adapter implementations.The policy “live AEAT submission is permanently forbidden” is a foundational invariant, not an adapter implementation detail.
See also
core.access_gate.AeatAccessGateGate that raises these errors from live-read and live-write checks.
LiveSubmitForbiddenErrorPermanent refusal raised by every attempted live AEAT write.
adapters.outbound.aeat.export._submittersEmpty adapter namespace kept free of remote submitter implementations.
- exception AccessGateSubmissionError(message, *, translated_message=None)[source]¶
Bases:
AeatErrorBase class for live-write access-gate submission policy failures.
- Variables:
translated_message – Optional
core.i18n.Translatablepayload carrying a user-facing version of the message.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception AccessGateSubmissionPreflightError(message, *, translated_message=None)[source]¶
Bases:
AccessGateSubmissionErrorRaised when access-gate preflight rejects a write-shaped operation.
- code: ClassVar[ErrorCode]¶
- exception LiveSubmitForbiddenError(message='live AEAT submission is permanently forbidden; use produce -> verify -> export and upload the file yourself in the AEAT portal', *, translated_message='errors.locked.locked_access_gate_live_submit_forbidden')[source]¶
Bases:
AccessGateSubmissionPreflightErrorRaised when any caller attempts a permanently forbidden live AEAT write.
- code: ClassVar[ErrorCode]¶
- exception AeatLiveReadNotEnabledError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorRaised when pytest live-read access is required but the test gate is shut.
Emitted by
core.access_gate.AeatAccessGate.require_live_read()during pytest execution whenAEAT_LIVE_TESTS_ENABLEDis not set to"1". Operator-facing live reads are controlled by auth/profile/read-only guards rather than this test opt-in variable.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception AuthorizationManifestError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorRaised when the multi-year-renta authorization manifest is malformed.
Emitted by the authorization-manifest loader when an
authorization.d/<modelo>.tomlfragment cannot be parsed or declares an entry that violates the manifest invariants (a single-year enrollment claim, a duplicate modelo, an unknown field). An absent fragment directory is not an error: default-deny-by-absence yields an empty manifest that authorizes zero modelos.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶