Open trimi-cyber opened 2 years ago
@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
If you're following "Handling Duplicate Database Fields", you can fix by doing:
is not working