Next.js Discord

Discord Forum

Show server error on client

Answered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
I know there are other threads for this but I have yet to find a proper solution. Is there currently no way to disable this behaviour?
Returning a successful response with error field is not a good solution as this will also not work with errorboundary
Answered by West African Lion
yeah I think that might be to optimal solution here. I opted for a weird one since I didn't want to rewrite much.

then in my boundary or anywhere else I call getPublicErrorMessage()
View full answer

2 Replies

West African LionOP
yeah I think that might be to optimal solution here. I opted for a weird one since I didn't want to rewrite much.

then in my boundary or anywhere else I call getPublicErrorMessage()
Answer