aeat.application.filing.errors module

Application-layer errors for application.filing.

The domain filing package owns record, import, export, amendment, and builder errors. This module adds the application-specific root used by persistence and summary helpers while preserving the domain.filing.ModeloDraftError catch boundary.

See also

domain.filing._errors

Domain filing error hierarchy raised by draft, import, export, and amendment records.

application.filing._calculate

Calculation-summary surface that raises ModeloCalculateError for invalid next-action invariants.

application.filing._runtime_repository

Runtime persistence helper that raises ModeloApplicationError for filing-bucket resolution failures.

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

Bases: ModeloDraftError

Base class for errors raised by the filing application layer.

The class extends domain.filing.ModeloDraftError so callers that catch the domain filing boundary still catch application-level filing failures.

Parameters:
  • message (str | None)

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

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

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

Bases: ModeloApplicationError, ValueError

Raised when calculation-summary invariants are refused.

The ValueError mixin keeps pydantic model validators and callers that expect validation-style failures aligned with ModeloApplicationError.

Parameters:
  • message (str | None)

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

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

code: ClassVar[ErrorCode]