Skip to content

fix: fix JSONRPC error handling#957

Merged
guglielmo-san merged 8 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/add_aiter_on_jsonrpc
Apr 9, 2026
Merged

fix: fix JSONRPC error handling#957
guglielmo-san merged 8 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/add_aiter_on_jsonrpc

Conversation

@guglielmo-san
Copy link
Copy Markdown
Member

Description

Do one iteration to catch exceptions occurred beforehand to return an error instead of sending headers for SSE.

@guglielmo-san guglielmo-san requested a review from a team as a code owner April 9, 2026 14:15
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

Base PR Delta
src/a2a/client/transports/http_helpers.py 89.74% 93.59% 🟢 +3.85%
src/a2a/client/transports/jsonrpc.py 90.07% 91.39% 🟢 +1.32%
src/a2a/server/routes/jsonrpc_dispatcher.py 85.16% 85.71% 🟢 +0.56%
Total 92.33% 92.39% 🟢 +0.07%

Generated by coverage-comment.yml

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the streaming request processing in the JSON-RPC dispatcher to eagerly fetch the first event, ensuring that validation errors are caught upfront rather than after the stream has started. It also includes a new integration test to verify this behavior. I have suggested using the specific Protobuf base class for type hints instead of 'Any' to improve type safety and adhere to repository standards.

@guglielmo-san guglielmo-san enabled auto-merge (squash) April 9, 2026 15:59
@guglielmo-san guglielmo-san merged commit 6c807d5 into a2aproject:1.0-dev Apr 9, 2026
15 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.

2 participants