What is the improvement or update you wish to see?
When throwing an error in a server action we get back the right message in a client component while we're in development mode, but in production the error message is hidden behind this message:
An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
What is the improvement or update you wish to see?
When throwing an error in a server action we get back the right message in a client component while we're in development mode, but in production the error message is hidden behind this message:
An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
The documentation on how to handle validation in server actions is misleading because of this: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#validation
It should state that we should return an error message instead of throwing an error.
Is there any context that might help us understand?
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#validation
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#validation
DX-1649