aeat.application.export._errors module

Errors raised by serialize_tabular_rows() and tabular export models.

ExportFormatError rejects unsupported ExportSerializationFormat values, while ExportFieldError carries TabularExportResult field and payload invariant failures through the typed error registry.

exception ExportFormatError(message=None, *, context=None, suggestion=None, translated_message=None)[source]

Bases: CoreError

Raised when an unsupported export serialization format is requested.

The tabular export pipeline is closed over the declared ExportSerializationFormat enum members. Requesting any value outside that set violates the pipeline contract and is surfaced as this error rather than a bare ValueError.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

code: ClassVar[ErrorCode]
exception ExportFieldError(message=None, *, context=None, suggestion=None, translated_message=None)[source]

Bases: CoreValidationError

Raised when a field validation invariant is violated during tabular export.

Field-level invariants (non-empty names, no duplicates, no unknown keys) are enforced before serialization. Each violation raises this error instead of a bare ValueError so the failure propagates through the typed error registry and produces a structured envelope.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

code: ClassVar[ErrorCode]