aeat.domain.portals._errors module¶
Error hierarchy for the portal catalogue.
Every error raised from aeat.domain.portals derives from
PortalRegistryError, which in turn derives from the project
root aeat.core.errors.AeatError. Two concrete subclasses cover the
failure modes surfaced to external callers:
UnknownPortalError— raised by registry lookups on an unknown / unparseable portal name.PortalIntegrityError— raised at import time during registry assembly when a structural invariant is violated.
- exception PortalRegistryError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase class for every error raised from
aeat.domain.portals.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception UnknownPortalError(portal)[source]¶
Bases:
PortalRegistryErrorRaised by
aeat.domain.portals.get_portal()on unknown names.- Variables:
portal – The offending portal name or value as supplied by the caller.
- Parameters:
portal (str)
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception PortalIntegrityError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
PortalRegistryErrorRaised at import time when the registry fails a structural check.
Signals that a portal registry entry violates a structural invariant, such as a missing member, extra member, duplicate entry, or dangling
replaced_byreference. It can also surface invalid registry-backed portal bindings during lookup.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception PortalValidationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
PortalRegistryError,ValueErrorRaised when portal metadata violates state or shape invariants.
Inherits from ValueError to maintain compatibility with Pydantic validators.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶