Skip to content

fix: production error handling for streaming JSON and A2UI parsing#82

Merged
blove merged 1 commit into
mainfrom
error-handling
Apr 9, 2026
Merged

fix: production error handling for streaming JSON and A2UI parsing#82
blove merged 1 commit into
mainfrom
error-handling

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 9, 2026

Summary

  • Parser edge case tests — empty input, whitespace-only, invalid chars in EXPECT_VALUE, trailing text after valid JSON, 100K-char strings, 100-level nesting
  • Classifier error recoveryerrors: Signal<string[]> on ContentClassifier, all store.push() and A2UI parser/store calls wrapped in try/catch to prevent crashes from bubbling up to the chat template
  • Graceful degradation — parse errors are captured but don't stop the classifier; partial results continue to render

Test plan

  • 6 new parser edge case tests pass
  • 2 new classifier error handling tests pass
  • All existing tests continue to pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 9, 2026 5:21pm

Request Review

@blove blove merged commit 2b6d592 into main Apr 9, 2026
12 of 13 checks passed
@blove blove deleted the error-handling branch May 7, 2026 16:30
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.

1 participant