Repository navigation
Conversation
Signed-off-by: gulldan <[email protected]>
An error inside an HTTP+JSON stream was sent as an unnamed SSE frame carrying the google.rpc.Status body (a2aproject#449). a2a-python's REST client treats a frame as an error only when its event name is "error" and reads every other frame as a StreamResponse, so the error was dropped on the floor and the consumer got an empty event instead. a2a-python's own REST server names the frame; this does the same. The JSON-RPC binding is unchanged: its error travels inside the envelope. Co-Authored-By: Claude Mythos 5.1 <[email protected]> Signed-off-by: gulldan <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
|
Replaced by #490, which carries these commits plus one that keeps the signature of the public |
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 #479.
Problem
The error frame of an HTTP+JSON stream had no event name. a2a-python's REST client dispatches on the name:
errorgoes to its error handler, anything else is parsed as aStreamResponse, so the google.rpc.Status body that #449 introduced was read as an empty event and the error never reached the caller. a2a-python's REST server names the frameerror.Fix
sse::sse_from_streamtakes the stream's error type as a serializable value and sends anErritem under the event nameerror, with the body as given.rest_ssemaps anA2AErrorto the{"error": Status}envelope and leaves it on theErrside, so the frame is named. The body is unchanged from fix(rest): send stream errors as google.rpc.Status #449, andsse_jsonrpc_streamis untouched: a JSON-RPC error stays inside the envelope, where its client reads it.The Rust client ignores
event:lines and already maps the body (#449), so it is unaffected; a2a-go's client reads the body regardless of the name.Tests
test_stream_error_event_is_a_google_rpc_statusnow also checks that the error frame, and only it, is namederror. Onmainno frame is named.sseunit tests exercise the named frame and the per-response ids with a serializable error.main3f3dea6: all green (868 tests). Patch coverage ascoverage.ymlbuilds it: 27 coverable added lines, 0 missed.Overlap
One commit on
main, after #449.a2a-server/src/sse.rsandrest_sseonly; #468 does not touch either.🤖 Generated with Claude Code