a2a: display JSON-RPC errors with full details#2186
Merged
Conversation
The previous error handling was useless - it showed a generic "Sorry, I encountered an error" message that told users nothing about what actually went wrong. Now when an A2A JSON-RPC error occurs, we display a proper error block showing code, message, and data fields. Error codes are mapped to human-readable names based on a2a-go/a2a/errors.go. The duplicate error message creation in use-chat-actions.ts is removed since use-message-streaming.ts now handles error display properly via the onMessageUpdate callback.
3ff4658 to
dd7e764
Compare
malinskibeniamin
approved these changes
Jan 27, 2026
malinskibeniamin
approved these changes
Jan 28, 2026
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.
What
Display A2A JSON-RPC errors with full details (code, message, data) instead of a useless generic error message.
Why
The previous error handling showed "Sorry, I encountered an error. Please try again." - completely useless for debugging. Users had no idea what went wrong.
Implementation details
a2a-errorContentBlock type using SDK'sJSONRPCErrortypeA2AErrorBlockcomponent renders error details in a destructive AlertparseA2AError()extracts code/message/data from error stringsReferences
a2a-js PR: a2aproject/a2a-js#315