Commit Graph

3 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
57412238cd fix(api): keep unhandled-exception 500s inside the middleware stack
#928 returned JSON for unhandled exceptions via @app.exception_handler
(Exception). Starlette installs that on its outermost ServerErrorMiddleware,
so the response skips every middleware registered in this module: the 500
carried no CORS headers — a cross-origin caller saw an opaque CORS failure
instead of the JSON body, defeating the point — and never reached the
selective access log either.

Same body, same status, registered as a middleware ahead of CORSMiddleware so
it sits inside it and the response travels back out through the normal stack.
One boundary rather than an out-of-band second mechanism.
2026-08-19 23:52:33 +08:00
evan188199-tech
a8d41bd4fa fix(api): return JSON for unhandled exceptions (#928)
A catch-all handler so 500s carry a JSON body instead of Starlette's plain-text default.
2026-08-19 23:36:18 +08:00