mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
better distinguish between handled and not handler errors
This commit is contained in:
@@ -69,7 +69,8 @@ module.exports = function errorHandler (err, req, res, next) { // eslint-disable
|
||||
originalUrl: req.originalUrl,
|
||||
headers: omit(req.headers, ['x-api-key', 'cookie']), // don't send sensitive information that only adds noise
|
||||
body: req.body,
|
||||
statusCode: responseErr.httpCode,
|
||||
httpCode: responseErr.httpCode,
|
||||
isHandledError: responseErr.httpCode < 500,
|
||||
});
|
||||
|
||||
let jsonRes = {
|
||||
|
||||
Reference in New Issue
Block a user