next.js
33e14f09 - Add render source to onRequestError context (#67703)

Commit
1 year ago
Add render source to onRequestError context (#67703) ### What Provide `renderSource` for app router pages rendering errors in instrumentation.js `onRequestError`. Discussed with @gnoff that we refactored the error handlers a bit to decouple from the Error render source since the handlers act differently in different render phase. ### Why This provides an easy way to determine wether the renderign error is actually from SSR or RSC rendering. Since the RSC error is embedded in the flight data and the final errors is only reported through React SSR rendering. Previously you can use the `digest` property sent to browser to associate the actual error logged with your o11y provider, but it still takes some effort, this would be the easy way to capture the original source Closes NDX-24
Author
Parents
Loading