Next.js Discord

Discord Forum

Accessing the actual error in global-error

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Avatar
Nile CrocodileOP
Hi, I am wondering how to access the actual error inside a global error page. I am always getting a censored error. Help

1 Reply

Avatar
global-error.js and error.js are meant for unexpected errors (i.e. bugs in your code and the app has crashed). hence the error is censored.

for expected errors (e.g. user errors), simply use conditional statements inside the page to render the error message