Pattern for handling 500 errors on React Server Components
Unanswered
Giant Angora posted this in #help-forum
Giant AngoraOP
We have a Nextjs App deployed on Vercel.
We created
But when something fail inside React Server Component
well, this will throw the default 500 page of Next.js instead of using the custom one we created on the error files.
What should i do in this case? How can i ensure that Next error files capture errors happens on RSC?
We created
global-error.tsx
and error.tsx
files. We even have <ErrorBoundary/>
component wrapping all the content of the page. But when something fail inside React Server Component
export default function Page(){
throw new Error("Something went wrong");
}
well, this will throw the default 500 page of Next.js instead of using the custom one we created on the error files.
What should i do in this case? How can i ensure that Next error files capture errors happens on RSC?