cadrumo.adapters.outbound.aeat.sede.errors module¶
Exception hierarchy for adapters.outbound.aeat.sede.
Defines the base SedeError plus the narrowly-scoped subclasses
raised by the sede navigation, parsing, and fetch helpers. Every
subclass extends core.errors.hierarchy.CadrumoError so callers can
trap the whole AEAT integration surface with a single
except CadrumoError.
- exception SedeError(message=None, *, failure_mode=None, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorBase class for post-auth AEAT sede errors.
Extends
core.errors.hierarchy.CadrumoErrorso callers tracking cross-package errors can catch the whole AEAT surface uniformly.- Parameters:
- Return type:
None
- property live_iva_failure_mode: LiveIvaAcquisitionFailureMode¶
Translate the Sede taxonomy into the live application contract.
- code¶
- class SedeFailureMode(*values)[source]¶
Bases:
StrEnumClosed post-auth Sede failure modes surfaced by live browser adapters.
- LIVE_NAVIGATION_FAILED¶
- SITE_HEALTH_FAILED¶
- BROWSER_BACKEND_FAILED¶
- EXTERNAL_SHAPE_CHANGED¶
- AUTH_GATE_DETECTED¶
Bases:
SedeErrorRaised when a navigation step fails (goto, click, wait).
- Parameters:
- Return type:
None
- exception SedeParseError(message=None, *, failure_mode=None, context=None, translated_message=None)[source]¶
Bases:
SedeErrorRaised when the captured HTML cannot be parsed to a record.
- Parameters:
- Return type:
None
- code¶
- exception ExpedienteNotFoundError(message=None, *, failure_mode=None, context=None, translated_message=None)[source]¶
Bases:
SedeErrorRaised when no expediente matches the requested filter.
- Parameters:
- Return type:
None
- code¶
- exception JustificanteFetchError(message=None, *, failure_mode=None, context=None, translated_message=None)[source]¶
Bases:
SedeErrorRaised when the CSV-keyed PDF download fails or is malformed.
- Parameters:
- Return type:
None
- code¶
- exception SedeValidationError(message=None, *, failure_mode=None, context=None, translated_message=None)[source]¶
Bases:
SedeErrorRaised when data captured from Sede violates expected shape or invariants.
Pydantic callbacks translate this registered error to a plain
ValueErrorat their narrow boundary; direct sede adapter helpers keep the registered type.- Parameters:
- Return type:
None
- code¶
- exception BrowserAdapterTypeError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CoreErrorRaised when
BrowserContext.new_page()returns an unexpected type.All three sede live-adapter entry points (Renta WEB Open, NIF-IVA check, GROI check) guard the
BrowserContext.new_page()return value against Playwright version skew or mock-adapter misuse. This shared error class replaces the three bareTypeErrorraises so callers can catch a typed, registered envelope instead of the built-in exception.- Parameters:
- Return type:
None
- code¶