Description
After the Flask → FastAPI migration, the /api/chat route still calls jsonify() in the null-result branch. jsonify is a Flask function that does not exist in FastAPI.
Impact
Any question that returns no retrieval results from ChromaDB triggers an uncaught NameError: name 'jsonify' is not defined, returning a 500 Internal Server Error instead of a graceful fallback answer.
Location
backend/app.py — inside the /api/chat route, null-result branch.
Fix Applied (commit 2936cb5)
Replaced return jsonify(chat_response(...)) with a plain return chat_response(...), which FastAPI serializes to JSON automatically.
Labels
bug, backend
Description
After the Flask → FastAPI migration, the
/api/chatroute still callsjsonify()in the null-result branch.jsonifyis a Flask function that does not exist in FastAPI.Impact
Any question that returns no retrieval results from ChromaDB triggers an uncaught
NameError: name 'jsonify' is not defined, returning a 500 Internal Server Error instead of a graceful fallback answer.Location
backend/app.py— inside the/api/chatroute, null-result branch.Fix Applied (commit 2936cb5)
Replaced
return jsonify(chat_response(...))with a plainreturn chat_response(...), which FastAPI serializes to JSON automatically.Labels
bug, backend