Next.js Discord

Discord Forum

How to display Errors in case of a server component data fetching API throws an error?

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
for understanding purposes, I ahve provided an image where I have a Homepage, which has mutliple server components rendering here. While fetching data in individual component, I am able to show the loading indicator using Suspense. But, I am facing an issue to display the error when anyone of these server components had an error while data fetching. Can anyone help me in resolving this pls.

Note: I am not using Server Actions yet as they are still in alpha phase.

0 Replies