app.use(globalErrorHandler)
trimi-cyber opened this issue · 2 comments
trimi-cyber commented
is not working
subha1206 commented
@trimi-cyber in errorController.js file do the following changes...
module.exports = (err, req, res)
change this to module.exports = (err, req, res, next)
sendErrorDev(err, req, res)
to sendErrorDev(err, req, res, next)
sendErrorProd(error, req, res)
to sendErrorProd(error, req, res, next)
and dont forgot to call next()
method in both sendErrorDev
and sendErrorProd
hope this will help
felipe-miranda-marreiros commented