aeat.core.errors._not_found module

CoreNotFoundError — shared base for all not-found failures across layers.

CoreNotFoundError gives callers a single catch surface for any “resource or record does not exist” failure regardless of which layer raises it. It inherits from both CoreError (binding it to the registry and the CoreError catch surface) and KeyError (binding lookup misses to Python’s mapping-style missing-key contract).

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

Bases: CoreError, KeyError

Raised when a requested resource or record cannot be located.

Domain- and application-layer not-found errors should descend from this class rather than directly from core.errors.AeatError so callers can catch the whole not-found surface with a single except CoreNotFoundError clause.

Inherits from KeyError so repository and catalogue lookup misses keep the same typed contract as Python mapping lookups.

Parameters:
  • message (str | None)

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

  • suggestion (str | None)

  • translated_message (str | None)

Return type:

None

code: ClassVar[ErrorCode]