You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JSON-RPC server returns -32603 instead of -32700 for a deeply nested body #1566
A body nested deeper than the JSON decoder can handle makes request.json() raise RecursionError. The parse-error clause only catches JSONDecodeError and UnicodeDecodeError (server/routes/jsonrpc_dispatcher.py:343), so it falls through to -32603 Internal error with HTTP 200. REST already returns a 400 for the same body.
Your root-cause analysis is right: await request.json() in JsonRpcDispatcher.handle_requests() raises RecursionError on deeply nested payloads, and because only (JSONDecodeError, UnicodeDecodeError) are caught as JSONParseError, it falls through to -32603 (InternalError).
PR #1568 looks clean and properly scoped around await request.json() (preserving -32603 for any downstream RecursionError in RequestHandler/AgentExecutor), with targeted test coverage.
Assigning this issue to you until the PR is reviewed.
Activity
rohityan commentedon Dec 1, 2026
Hi @ConnorMoss02, Thanks for reporting this and opening #1568.
Your root-cause analysis is right:
await request.json()inJsonRpcDispatcher.handle_requests()raisesRecursionErroron deeply nested payloads, and because only (JSONDecodeError,UnicodeDecodeError) are caught asJSONParseError, it falls through to-32603(InternalError).PR #1568 looks clean and properly scoped around
await request.json()(preserving-32603for any downstreamRecursionErrorinRequestHandler/AgentExecutor), with targeted test coverage.Assigning this issue to you until the PR is reviewed.
fix(server): return a parse error for a deeply nested JSON-RPC body (a…