How does nextjs handle unhandled errors on server-side?
Unanswered
Mottled Duck posted this in #help-forum
Mottled DuckOP
Will it crash the server or not, and does it differ on prod / dev?
thanks
thanks
3 Replies
Northeast Congo Lion
If you mean at an API route, afaik the serverless function exists after it's run.
So, no, i dont think it will crash your whole application, but your code should be catching errors. Next will serve a 500 internal server error page if it can't process the page.
Mottled DuckOP
Thank you @Northeast Congo Lion , I know I should catch errors. I was just asking out of curiosity really.