Files
Auto_Bangumi/backend
HuajunGao ab64186a38 fix(mcp): return Response() from handle_sse to prevent NoneType error
When an MCP client disconnects, Starlette tries to call the return value
of the handle_sse endpoint as an ASGI response. Since the function had
no return statement it returned None, causing:

  TypeError: 'NoneType' object is not callable

The mcp library's own SseServerTransport docstring explicitly documents
this requirement. Fix by adding 'return Response()' and importing
starlette.responses.Response.
2026-02-28 14:54:43 +11:00
..