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
This chapter suggests that uncaught server action exceptions can be caught using an error.tsx error boundary component. However, based on my experience, this behavior only works in development mode.
In production, it seems to behave differently. Instead of rendering the content from my error boundary, I’m seeing this generic message:
Application error: a server-side exception has occurred (see the server logs for more information).
This raises several questions:
Is this the expected behavior in production?
If so, how are developers supposed to handle uncaught exceptions effectively?
Should we be wrapping server actions in try/catch blocks and manually sending errors to the client for handling? Or is there a recommended approach that I might be missing?
Next.js version: 15
The text was updated successfully, but these errors were encountered:
This chapter suggests that uncaught server action exceptions can be caught using an
error.tsx
error boundary component. However, based on my experience, this behavior only works in development mode.In production, it seems to behave differently. Instead of rendering the content from my error boundary, I’m seeing this generic message:
This raises several questions:
Should we be wrapping server actions in try/catch blocks and manually sending errors to the client for handling? Or is there a recommended approach that I might be missing?
Next.js version: 15
The text was updated successfully, but these errors were encountered: