Error boundary for server components
Unanswered
Chippiparai posted this in #help-forum
ChippiparaiOP
I've seen lots of conflicting information and need some help with handling errors inside server components.
I have a modular page-building app that renders dynamic components based on content entered into my CMS. Since migrating to the app directory, most of these are server components. When they were client components, if there was an error, the Error Boundary wrapped around each module would isolate the error to that module and render the rest of the page.
Now, if there is an unexpected error in the server component, I would expect a similar experience, however it errors out the entire page with an ugly 500 server error message. Is that the best experience possible with server components?
I have a modular page-building app that renders dynamic components based on content entered into my CMS. Since migrating to the app directory, most of these are server components. When they were client components, if there was an error, the Error Boundary wrapped around each module would isolate the error to that module and render the rest of the page.
Now, if there is an unexpected error in the server component, I would expect a similar experience, however it errors out the entire page with an ugly 500 server error message. Is that the best experience possible with server components?