You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In error.tsx (Next.js error boundary), instead of the error message, we get the stub: "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 expected behavior
We often need to read the specific error message that we throw from the server, so I suggest adding an optional parameter to show the messages.
For example:
// Server ComponentthrownewError('Some custom error',{cause: 'TopLevelError'});
In error.tsx (Next.js error boundary), instead of the error message, we get the stub: "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 expected behavior
We often need to read the specific error message that we throw from the server, so I suggest adding an optional parameter to show the messages.
For example:
// Server Component
throw new Error('Some custom error', { cause: 'TopLevelError' });
//
As a temporary solution, we can use something like this, but I really hope that we will receive an official way to save error messages from the server side.
React version:19
Steps To Reproduce
The current behavior
In
error.tsx
(Next.js error boundary), instead of the error message, we get the stub: "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 expected behavior
We often need to read the specific error message that we throw from the server, so I suggest adding an optional parameter to show the messages.
For example:
The text was updated successfully, but these errors were encountered: