fix(render): handle synchronous render errors in server rendering#3458
fix(render): handle synchronous render errors in server rendering#345821vedansh wants to merge 3 commits intoresend:canaryfrom
Conversation
|
@21vedansh is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
|
commit: |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR modifies error handling and flow control in the core rendering path. It introduces try/catch blocks and manual promise rejection in a critical system path.
|
Hey! @gabrielmfern just a polite reminder on this PR 🙂 Happy to make any changes or add tests if needed. Thanks! |
Fixes #3075
Fix: prevent uncaught synchronous errors during render
Some render-time errors (e.g. accessing undefined props) can occur
synchronously before the Promise chain even begins, causing such errors to bypass
.catch()and crash the process.This change wraps both
renderToReadableStreamandrenderToPipeableStreamcalls in try/catch blocks to ensure such errorsare forwarded via
reject().Now users can properly handle errors using
try/catch.