Skip to content

Commit

Permalink
send message and code from object
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Kuminov committed Apr 25, 2020
1 parent 709e612 commit 82d62a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/interfaces/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Service() {
}
}
const scope = di.context(moduleName);
scope.sysLog.error(err);
scope.sysLog.error(typeof err === 'object' && err.message ? err.message : err);
if (typeof err.code == 'number' && err.code >= 400 && err.code < 500) {
return res.status(err.code).send(err.message);
}
Expand Down

0 comments on commit 82d62a4

Please sign in to comment.