Open Sneruall opened 2 years ago
express:
.catch((err) => { const error = new Error(err); error.httpStatusCode = 500; return next(error); });
app.use((error, req, res, next) => { // res.status(error.httpStatusCode).render(...); res.redirect('/500'); })
find out how this works for nextJS apps
express:
app.use((error, req, res, next) => { // res.status(error.httpStatusCode).render(...); res.redirect('/500'); })
find out how this works for nextJS apps