-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stitch errors with owner stack #69432
base: canary
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Failing test suitesCommit: c60d825
Expand output● app dir - with output export and custom distDir (next dev) › should render properly
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - dynamic error trace › should show the error trace
Read more about building and testing Next.js in contributing.md.
Expand output● stitching errors › should log stitched error for browser uncaught errors
● stitching errors › should log stitched error for browser uncaught errors
● stitching errors › should log stitched error for browser caught errors
● stitching errors › should log stitched error for SSR errors
● stitching errors › should log stitched error for SSR errors
Read more about building and testing Next.js in contributing.md.
Expand output● dev-fetch-hmr › should retain module level fetch patching |
What
When we're using experimental react, we'll leverage React's new experimental API
captureOwnerStack
to access the owner stack trace and then stitch it with the current error trace from the stack framereact-stack-bottom-frame
.As the API only existed on experimental channel of React, we only enable it when PPR is enabled right now. Could extend to when react experimental is used later (either when
taint
ordynamicIO
is enabled).Why
In this way we'll provide more helpful stack trace for react errors, and users can easily tell how the error was triggered through the rendered component tree.