Format and test fixes
This commit is contained in:
@@ -80,6 +80,9 @@ app.use(function (err, req, res, next) {
|
||||
if (res.headersSent) {
|
||||
return next(err);
|
||||
}
|
||||
if (err.code && err.code === 500) {
|
||||
console.log(err);
|
||||
}
|
||||
res.status(err.code || 500);
|
||||
res.json({
|
||||
error: err.message || `Internal Server Error - "${err.message}"`,
|
||||
|
||||
Reference in New Issue
Block a user