Project ui code using incorrect error property

This commit is contained in:
Nick O'Leary
2019-01-09 17:03:17 +00:00
parent 0ec04a3624
commit 81ae552e69
5 changed files with 18 additions and 18 deletions

View File

@@ -43,7 +43,7 @@ module.exports = {
rejectHandler: function(req,res,err) {
//TODO: why this when errorHandler also?!
log.audit({event: "api.error",error:err.code||"unexpected_error",message:err.message||err.toString()},req);
res.status(err.status||500).json({
res.status(err.status||400).json({
code: err.code||"unexpected_error",
message: err.message||err.toString()
});