How to log errors in development the same way in production with server actions #65472
Unanswered
elie222
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In production, the error that shows is:
"An error occurred in the Server Components."
In development, it shows the real error.
This is to make life "easier' in development mode. But it actually makes things harder because you think the errors are correctly displayed to users when testing in dev mode with "error.message", but then they see something completely different when using the prod app.
Would be great to have an option to disable this feature in the next.config file, or to completely remove it. It makes DX way worse. Not better.
Beta Was this translation helpful? Give feedback.
All reactions