aeat.domain._errors module¶
Lightweight validation error base for root domain value objects.
Defines DomainValidationError, the core.errors.AeatError
subclass that also behaves as ValueError so Pydantic validators can
surface invalid domain identifiers and models as validation failures.
This module is not a catch-all domain error hierarchy. Focused domain packages
own their package-specific _errors.py trees and register those classes with
the central error registry. The root validation base exists for lightweight
cross-domain primitives such as domain.ModeloIdentifier, where
importing a larger package-specific authority would be the wrong dependency.
- exception DomainValidationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatError,ValueErrorRaised when root-level domain identifiers or value objects are invalid.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶