aeat.domain.invoices._errors module¶
Domain exceptions for the invoice catalogue.
Defines the typed error hierarchy raised by aeat.domain.invoices.
Every failure path inherits from InvoiceError so callers can
catch the whole domain, while InvoiceCatalogueError and its
subclasses narrow to catalogue-level faults (persistence, missing
records, broken cross-catalogue links).
- exception InvoiceError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase error for every invoice-catalogue failure.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoiceCatalogueError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
InvoiceErrorRaised when an invoice catalogue is invalid or inconsistent.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoicePersistenceError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
InvoiceCatalogueErrorRaised when invoice catalogue persistence cannot be completed.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoiceNotFoundError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
InvoiceCatalogueErrorRaised when a catalogue lookup targets a missing invoice.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoiceLinkError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
InvoiceCatalogueErrorRaised when a bidirectional invoice/transaction link cannot proceed.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoiceLinkInconsistencyError(*, invoice_path, transactions_path, invoice_id, transaction_id, message)[source]¶
Bases:
InvoiceLinkErrorRaised when a bidirectional link leaves the two catalogues out of sync.
Carries both filesystem paths and both identifiers so an operator can manually reconcile the invoice and transaction catalogues.
- Variables:
invoice_path – Path to the invoice catalogue file.
transactions_path – Path to the transaction catalogue file.
invoice_id – Invoice identifier involved in the failed link.
transaction_id – Transaction identifier involved in the failed link.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception InvoiceValidationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
InvoiceError,CoreValidationErrorRaised when invoice records violate state or shape invariants.
Inherits from CoreValidationError (which itself inherits from CoreError and ValueError) to participate in the shared CoreValidationError catch surface and remain compatible with pydantic validators.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶