proposal: log warning when stream error parsing fails#661
proposal: log warning when stream error parsing fails#661dev-punia-altimate wants to merge 1 commit intomainfrom
Conversation
Category: error-swallowing Severity: medium Repo: altimate-code Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughEnhanced error handling in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposal
Repo: altimate-code
Category: error-swallowing
Severity: medium
Files:
packages/opencode/src/session/message-v2.tsWhat I Found
In the
toError()method (line 998), whenProviderError.parseStreamError(e)throws an exception during error parsing, the failure is silently caught withcatch {}. This means:NamedError.Unknownwhich is correct fallback behavior, but the parsing failure is invisibleFix
Changed
catch {}tocatch (parseErr) { console.warn("[message-v2] Failed to parse stream error:", parseErr) }to log the parsing failure while preserving the existing fallback toNamedError.Unknown.Auto-generated by QA Autopilot Proposal Monitor. Open for 30-day human review.
Summary by cubic
Add a warning when stream error parsing fails in
packages/opencode/src/session/message-v2.ts(MessageV2.toError()). This improves visibility while keeping the fallback toNamedError.Unknownunchanged.Written for commit 8a771b9. Summary will update on new commits.
Summary by CodeRabbit