Merged
Conversation
Enable clients to report errors back to the server using the mutually exclusive error field on the v0.9 message envelope. Completes v0.3.0 spec compliance milestone. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Error demo agent (/agents/error-demo) with unknown component fallback UI and server-side error reporting round-trip - Demo pages in both WASM and Server sample apps with nav links - Python server parity for error demo endpoint - ComponentRegistry warns only once per unknown type (HashSet) - A2UIComponentRenderer warns only once per component instance - Fix ObjectDisposedException in A2UIStreamClient.Dispose() when CancellationTokenSource was already disposed during circuit teardown Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
A2UIClientErrorprotocol type: New class withCode,SurfaceId,Message,Path?— matches v0.9client_to_server.jsonerror schemaA2UIClientMessage.Error: Envelope now supports mutually exclusiveactionORerrorfield (both useJsonIgnore(WhenWritingNull))SendErrorAsync: New method onA2UIStreamClient— same pattern asSendActionAsync(POST envelope, process response stream, capabilities header)IA2UIAgent.HandleErrorAsyncdefault interface method (no-op); middleware routes error POSTs to itThis completes all v0.3.0 items (A2UI v0.9 Spec Compliance).
Test plan
ErrorEnvelope_Serializes_WithVersionAndError— envelope structureErrorEnvelope_OmitsAction_WhenOnlyErrorSet— mutual exclusivityErrorEnvelope_OmitsError_WhenOnlyActionSet— backwards compatibilityErrorEnvelope_IncludesPath_WhenProvided— VALIDATION_FAILED with pathErrorEnvelope_OmitsPath_WhenNull— generic error omits pathErrorEnvelope_HasExactlyTwoTopLevelProperties— version + error onlySendErrorAsync_SendsV09ErrorEnvelope— end-to-end POSTSendErrorAsync_IncludesCapabilitiesHeader— header presentSendErrorAsync_IncludesPath_ForValidationError— path in bodySendErrorAsync_OmitsPath_WhenNull— no path in bodySendErrorAsync_ProcessesResponseStream— dispatches server responseStreamClient_SendErrorAsync_NetworkError_Throws— error propagationStreamClient_SendErrorAsync_ServerError_Throws— 5xx propagation🤖 Generated with Claude Code