cadrumo.domain.buckets.errors module

Canonical narrow exceptions for the bucket-event-history domain.

BucketEventValidationError protects BucketEvent and BucketEventHistoryCatalogue invariants, while the maintenance errors cover operator-facing bucket browse, export, import, rename, and delete flows.

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

Bases: CadrumoError

Base error for the bucket-event-history domain.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketsError

Raised when a bucket event fails validation.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketsError

Base error for operator-driven bucket-maintenance operations.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketMaintenanceError

Raised when a bucket browse / search request cannot be served.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketMaintenanceError

Raised when a bucket archive export fails.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketMaintenanceError

Raised when a bucket archive import fails (bad payload or collision).

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketMaintenanceError

Raised when a bucket rename violates uniqueness or addressing rules.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: TerminalPreconditionErrorMixin[object], BucketMaintenanceError

Raised when a destructive-action gate refuses a bucket deletion.

The bucket-maintenance application boundary may attach a typed terminal precondition verdict when it observes a safety condition with no safe recovery command. The core-owned mixin carries that opaque application record without making this domain taxonomy depend on application models.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

  • precondition_verdict (VerdictT | None)

Return type:

None

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

Bases: BucketMaintenanceError

The refusal reserved for a bucket archive (soft, reversible dormancy).

Nothing raises it: the archive service method was deleted when the custody capsule became the sole profile authority, and this is the typed refusal its verb took rather than a guard on a live path.

Kept deliberately. The verb’s restore-or-retire decision is open, and the orphaned typed contracts around it – this refusal among them – are the cheapest specification available to whoever makes it. Deleting them would discard part of the answer before the question is settled.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

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

Bases: BucketMaintenanceError

The refusal reserved for restoring an archived bucket (e.g. not archived).

Nothing raises it, for the same reason and by the same change as BucketArchiveRefusedError: the restore service method was deleted with the archive one, and both refusals were kept as contract rather than retired with their verbs.

Parameters:
  • message (str | None)

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

  • translated_message (str | None)

Return type:

None

code