Implement centralized exception handling and validation
- Add custom exception classes for structured error handling - Implement global exception handlers in FastAPI application - Add comprehensive request/response validation - Create exception contract tests for validation - Update backend development documentation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,22 +1,3 @@
|
||||
## 4) Module-level mutable runtime flags in service layer
|
||||
- Where found:
|
||||
- [backend/app/services/jail_service.py](backend/app/services/jail_service.py)
|
||||
- Why this is needed:
|
||||
- Global mutable state is difficult to reason about under concurrency and tests.
|
||||
- Goal:
|
||||
- Move mutable runtime state to managed app/runtime state services.
|
||||
- What to do:
|
||||
- Replace module-level flags with injected state holder.
|
||||
- Guard mutations with clear synchronization boundaries.
|
||||
- Possible traps and issues:
|
||||
- Race conditions can reappear if state updates are spread across modules.
|
||||
- Docs changes needed:
|
||||
- Document allowed mutable-state locations.
|
||||
- Doc references:
|
||||
- [Docs/Architekture.md](Docs/Architekture.md)
|
||||
|
||||
---
|
||||
|
||||
## 5) Inconsistent domain exception contracts across services
|
||||
- Where found:
|
||||
- [backend/app/routers/jails.py](backend/app/routers/jails.py)
|
||||
|
||||
Reference in New Issue
Block a user