Files
Aegis/backend/app/domain/errors.py
Kitos 611e10620e
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
refactor(domain): introduce domain exceptions boundary
- Create domain/errors.py as canonical error hierarchy: DomainError, InvalidStateTransition, PermissionViolation, BusinessRuleViolation, EntityNotFoundError, DuplicateEntityError

- InvalidOperationError now inherits from BusinessRuleViolation for semantic consistency

- Convert domain/exceptions.py to backward-compatible re-export shim with legacy aliases (DomainException, InvalidTransitionError, AuthorizationError)

- Update error_handler.py to import from domain/errors.py and map all new error types

- Update main.py to register DomainError (new base) as the exception handler root
2026-02-18 13:44:47 +01:00

3.3 KiB