aeat.adapters.persistence.storage.bucket._errors module¶
Typed exception hierarchy for the per-bucket directory model.
Each class carries a structured payload (active bucket id, holding PID,
conflicting bucket id, recovery context) so callers can render typed
diagnostics without re-parsing the message string. Every class inherits
from core.errors.AeatError; the project error registry’s
__init_subclass__ hook binds each subclass to its declared
core.errors.ErrorCode row at import time.
- exception BucketError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
SecureStorageErrorBase class for every per-bucket lifecycle error.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception BucketValidationError(message=None, *, context=None)[source]¶
Bases:
BucketErrorRaised when a bucket parameter or manifest field fails validation.
- code: ClassVar[ErrorCode]¶
- exception NoActiveBucketError(detail=None)[source]¶
Bases:
BucketErrorRaised when no active bucket can be resolved.
The precedence chain is exhausted (no
--bucketflag, noAEAT_ACTIVE_BUCKETenv, no pointer file), and the process refuses to proceed.- Parameters:
detail (str | None)
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception BucketBusyError(*, bucket_id, holding_pid)[source]¶
Bases:
BucketErrorRaised when a second process attempts to unlock a held bucket.
Carries the holding PID so the caller can render the diagnostic without re-parsing the lockfile.
- code: ClassVar[ErrorCode]¶
- exception BucketAlreadyPresentError(*, bucket_id)[source]¶
Bases:
BucketErrorRaised when an import would collide with an existing bucket id.
Carries the conflicting bucket id.
- Parameters:
bucket_id (str)
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception BucketPathTooLongError(*, bucket_id, path)[source]¶
Bases:
BucketErrorRaised when provisioning a bucket directory exceeds the Windows
MAX_PATHceiling.Classified via
core.paths.is_windows_long_path_error()from a caughtWinError 3/WinError 206on legacy (non long-path-aware) Windows workstations. Distinct fromBucketValidationErrorso the CLI names the actual cause (the resolved bucket directory tree is too deep forMAX_PATH) instead of a generic validation failure.- code: ClassVar[ErrorCode]¶
- exception BucketLockedError(*, bucket_id)[source]¶
Bases:
BucketErrorRaised when an operation requires an unlocked
BucketSession.Carries the locked bucket id so the diagnostic can point the operator at
aeat config switch NAME.- Parameters:
bucket_id (str)
- Return type:
None
- code: ClassVar[ErrorCode]¶
Bases:
BucketErrorRaised when the recovery wrap cannot be loaded for the active bucket.
Distinguishes “recovery never enrolled” (the bucket’s manifest has
recovery_enrolled = false) from a torn or tampered envelope; the typed payload carries the active bucket id.- Parameters:
bucket_id (str)
- Return type:
None
- exception RecoveryVerificationError(detail=None)[source]¶
Bases:
BucketErrorRaised when the operator-typed recovery code does not decode.
Fired by
aeat config recoverwhen the 24-word entry does not unwrap the bucket’s recovery envelope.- Parameters:
detail (str | None)
- Return type:
None
- code: ClassVar[ErrorCode]¶