fix(web-ui): surface agent-level errors in chat UI#118
Merged
ShotaroKataoka merged 1 commit intoaws-samples:mainfrom May 6, 2026
Merged
fix(web-ui): surface agent-level errors in chat UI#118ShotaroKataoka merged 1 commit intoaws-samples:mainfrom
ShotaroKataoka merged 1 commit intoaws-samples:mainfrom
Conversation
Previously, agent-level errors were silently swallowed by the SSE
parser try-catch, leaving users with an infinite loading spinner.
Changes:
- strandsParser.js: handle {"status":"error"} SSE events with
user-friendly messages for each error category:
- Conversation limit (Too much media / input too long)
- Throttling (rate limit exceeded)
- Model timeout
- Model not ready
- Service unavailable
- Generic errors (show raw message with warning icon)
- ChatPanel.tsx: detect retryable vs conversation-limit errors
in catch block and show appropriate guidance
ShotaroKataoka
approved these changes
May 6, 2026
Contributor
There was a problem hiding this comment.
@yunohito
Thanks for the fix! This solves a real UX pain point — the infinite spinner was a bad experience.
A few notes for future improvement (will track as a separate issue):
- Error classification logic is duplicated between strandsParser.js and ChatPanel.tsx — we'll consolidate into a shared utility
- Parser ideally returns error type/code rather than UI strings, so the display layer controls messaging
- Error concatenation to currentCompletion vs message replacement in catch — we'll unify the behavior
Merging as-is since the fix is correct and impactful. Follow-up refactoring tracked separately.
4 tasks
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
Previously, Bedrock API errors (ValidationException, throttling, timeout)
were silently swallowed by the SSE parser, leaving users with an infinite
loading spinner and no feedback.
Changes
strandsParser.js: Handle{"status": "error"}SSE events withcategory-specific user-friendly messages (conversation limit,
throttling, model timeout, service unavailable, generic)
ChatPanel.tsx: Detect retryable vs conversation-limit errors andshow appropriate guidance
Testing
process. Please start a new chat to continue."