Skip to content

fix(server): return a parse error for a deeply nested JSON-RPC body - #1568

Merged
Iwaniukooo11 merged 2 commits into
a2aproject:mainfrom
ConnorMoss02:fix/jsonrpc-deep-nesting-parse-error
Dec 2, 2026
Merged

Iwaniukooo11 merged 2 commits into
a2aproject:mainfrom
ConnorMoss02:fix/jsonrpc-deep-nesting-parse-error

Conversation

@ConnorMoss02

Copy link
Copy Markdown
Contributor

Fixes #1566

A RecursionError from request.json() now returns -32700 Parse error. It's caught around the parse only, so a RecursionError from a handler still reports as an internal error. The test raises RecursionError from the parse directly, as #1540 does.

The new test in tests/server/routes/test_jsonrpc_dispatcher.py fails on main. tests/ passes, 2903 passed.

@ConnorMoss02
ConnorMoss02 requested a review from a team as a code owner November 30, 2026 21:13
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/cluster/database_event_stream.py 93.64% 97.27% 🟢 +3.64%
src/a2a/server/routes/jsonrpc_dispatcher.py 86.47% 86.62% 🟢 +0.15%
Total 94.27% 94.30% 🟢 +0.04%

Generated by coverage-comment.yml

@Iwaniukooo11 Iwaniukooo11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Iwaniukooo11
Iwaniukooo11 merged commit ada2166 into a2aproject:main Dec 2, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON-RPC server returns -32603 instead of -32700 for a deeply nested body

2 participants