Repository navigation
fix(compat): map v0.3 JSON-RPC error bodies sent with a non-2xx status - #1519
Open
ConnorMoss02 wants to merge 1 commit into
Open
ConnorMoss02 wants to merge 1 commit into
ConnorMoss02 wants to merge 1 commit into
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/compat/v0_3/jsonrpc_transport.py | 79.63% | 80.79% | 🟢 +1.16% |
| Total | 94.12% | 94.13% | 🟢 +0.01% |
Generated by coverage-comment.yml
chrikrah
approved these changes
Nov 26, 2026
chrikrah
left a comment
Contributor
There was a problem hiding this comment.
@ConnorMoss02 Approving: a straight port of #1476 that keeps HTTP Error: <status> for unmapped bodies.
# head b769225 (base eaa71bc), git archive, uv sync --locked --group httpx2, a2a.__file__ under the tree
$ pytest -q -n 4 tests
2723 passed, 215 skipped, 4 xfailed, 1 xpassed
# compat/v0_3/jsonrpc_transport.py from eaa71bc, tests kept
$ pytest -q tests/compat/v0_3/test_jsonrpc_transport.py
3 failed, 40 passed # unary 404 and 500, streaming
$ ruff check && ruff format --check # ruff 0.15.16
All checks passed! / 290 files already formatted
# not run: the ITK and TCK jobs
non-blocking: the 502 fallback cases are unary only. Add a streaming one?
Iwaniukooo11
requested changes
Nov 26, 2026
| known A2A code is mapped; any other body, such as a gateway's own | ||
| error, raises the generic HTTP error. Error bodies are mapped the same | ||
| way as in the 1.0 transport. | ||
| """ |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1517
CompatJsonRpcTransportnow raises the mapped A2A error when a v0.3 server sends a JSON-RPC error with a non-2xx status, for both unary and streaming calls, using the same check as #1476. Other bodies, like a gateway's HTML or an unknown code, still raiseHTTP Error: <status>.The new tests in
tests/compat/v0_3/test_jsonrpc_transport.pyfail on main. tests/ passes: 2723 passed.