Commit 057244

2026-03-19 23:07:27 Claude (MCP): [mcp] Update Server_Consolidation: resolve error handler merging
Design/Server_Consolidation.md ..
@@ 186,9 186,9 @@
- Tests call `create_app(db_path=..., ...)` with overrides as they do today.
- Actual import callsites across tests: ~17 (not ~46 as initially estimated). 3 test files, straightforward find-and-replace.
- ### Error handlers (important)
+ ### Error handlers (resolved)
- Both apps define `errorhandler(429)`, `errorhandler(500)`, `errorhandler(400)`. Flask allows only one handler per status code. Simplest fix: shared error template in `app/templates/error.html`.
+ The 429 handler is a verbatim copy (content-negotiated JSON/HTML). The 400/500 handlers only exist in auth_server and render HTML via `error.html`. No conflict: API routes go through ManagementMiddleware (raw WSGI, handles its own errors), so Flask error handlers only fire for `/auth/*` and `/app/*` routes. Keep one set of handlers, move `error.html` to `app/templates/error.html`.
### Deployment strategy (important)
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9