cadrumo.domain.filing.errors module

Domain errors for the domain.filing subpackage.

Every exception inherits from CadrumoError so callers can catch the project-wide base.

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

Bases: CadrumoError

Base class for every error raised inside domain.filing.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception ModeloBuilderError(message=None, *, context=None, translated_message=None)[source]

Bases: ModeloDraftError

Raised when builder selection or execution fails.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception FilingValidationError(message=None, *, context=None, translated_message=None)[source]

Bases: ModeloDraftError, CoreValidationError

Raised when a filing record is invalid.

Two distinct callers raise it. ModeloValidator never raises on its own — findings are returned — so this error is what a caller opting into fail_on_warning gets for a blocking finding on an otherwise well-formed draft. The schema models also raise it from their cross-field validators for a record that is structurally malformed: a provenance kind contradicting its own value, an identity that is not its own content address, or two identity Its registered ancestry includes CoreValidationError under the filing error family. Pydantic model validators translate the registered failure to ValueError at their narrow boundary, yielding a pydantic.ValidationError for structurally malformed records.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception ModeloComputationError(message=None, *, context=None, translated_message=None)[source]

Bases: ModeloDraftError

Raised when a builder cannot evaluate a formula casilla.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception ModeloImportError(message=None, *, context=None, translated_message=None)[source]

Bases: ModeloDraftError

Raised when importing a filing from a justificante PDF fails.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception FilingExportError(message=None, *, context=None, translated_message=None)[source]

Bases: ModeloDraftError

Raised when exporting a draft to an AEAT wire format fails.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code
exception FilingExportValidationError(message=None, *, context=None, translated_message=None)[source]

Bases: FilingExportError

Raised on invalid export field values or layouts.

Its canonical registered ancestry is FilingExportError; any Pydantic export validator translates this registered failure to ValueError at its narrow boundary.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code