Replies: 1 comment 2 replies
-
Take a look at |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
Currently if an error happens in a server component during rendering phase, the error is sent to the ErrorBoundary declared in
error.{jsx|tsx}
file in a anonymized way to avoid sensible informations exposition to the browser. While this is awesome and we have a digest to connect an Error with its counterpart in server logs, it is time spending and require one of these two actions to be made:Some companies has third parties logging tools (in our case Rollbar), we cannot log something significant in server side to understand what is going on.
The only alternative i've found is https://github.com/infodusha/next-rsc-error-handler but while it works (someone quoted it in bug: error: NEXT_REDIRECT trpc/trpc#5682, the dependency could lead to unwanted behaviors in future.
Proposal
Implement a mechanism to provide a callback or permits to handle an event somehow, in a pure server side, to log the error in an external provider. It is similar to what usually backends does and could helps a lot on fixing stuffs fastly.
I am interested in contributing on it but i didn't see the NextJS codebase yet.
Beta Was this translation helpful? Give feedback.
All reactions