generated from coulomb/repo-seed
Implement isolated user-engine MVP
This commit is contained in:
23
src/user_engine/errors.py
Normal file
23
src/user_engine/errors.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Typed exceptions raised by user-engine services."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class UserEngineError(Exception):
|
||||
"""Base class for user-engine failures."""
|
||||
|
||||
|
||||
class AuthorizationDenied(UserEngineError):
|
||||
"""Raised when the authorization port denies an operation."""
|
||||
|
||||
|
||||
class ConflictError(UserEngineError):
|
||||
"""Raised when a write would violate a uniqueness constraint."""
|
||||
|
||||
|
||||
class NotFoundError(UserEngineError):
|
||||
"""Raised when a requested domain object does not exist."""
|
||||
|
||||
|
||||
class ValidationError(UserEngineError):
|
||||
"""Raised when input fails domain validation."""
|
||||
Reference in New Issue
Block a user