loom.core.errors¶
- exception loom.core.errors.Conflict(message)[source]¶
Bases:
DomainErrorRaised when an operation conflicts with existing state.
- Parameters:
message (str) – Description of the conflicting condition.
- Return type:
None
- exception loom.core.errors.DomainError(message, *, code)[source]¶
Bases:
LoomErrorBase class for all business-logic errors.
Raised inside UseCase execution. Transport adapters catch and convert these to their own error representations.
- exception loom.core.errors.Forbidden(message='Forbidden')[source]¶
Bases:
DomainErrorRaised when an action is not permitted for the caller.
- Parameters:
message (str) – Description of the access restriction.
- Return type:
None
- exception loom.core.errors.LoomError(message, *, code)[source]¶
Bases:
ExceptionBase class for all framework errors.
Carries a machine-readable
codeused by transport adapters to produce appropriate responses (HTTP status, dead-letter routing, etc.) without coupling the domain to any transport layer.- Parameters:
- Return type:
None
Example:
raise NotFound("User", id=42)
- exception loom.core.errors.NotFound(entity, *, id)[source]¶
Bases:
DomainErrorRaised when a requested entity does not exist.
Emitted automatically by
LoadStepwhen a repository returnsNone. May also be raised explicitly insideexecutefor semantic not-found conditions.- Parameters:
entity (str) – Name of the missing entity type (e.g.
"User").id (Any) – Lookup key that yielded no result.
- Return type:
None
Example:
raise NotFound("User", id=42)
- exception loom.core.errors.SystemError(message)[source]¶
Bases:
LoomErrorBase class for infrastructure and unexpected errors.
Raised when a repository, external service, or internal subsystem fails. Transport adapters may retry on SystemError and dead-letter on DomainError.
- Parameters:
message (str) – Description of the system failure.
- Return type:
None