mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix linting and add comment
This commit is contained in:
@@ -32,6 +32,8 @@ export default function errorHandler (err, req, res, next) { // eslint-disable-l
|
||||
responseErr.message = err.message;
|
||||
}
|
||||
|
||||
// TODO make mongoose and express-validator errors more recognizable
|
||||
|
||||
// Handle errors by express-validator
|
||||
if (Array.isArray(err) && err[0].param && err[0].msg) {
|
||||
responseErr = new BadRequest(res.t('invalidReqParams'));
|
||||
@@ -40,7 +42,7 @@ export default function errorHandler (err, req, res, next) { // eslint-disable-l
|
||||
message: paramErr.msg,
|
||||
param: paramErr.param,
|
||||
value: paramErr.value,
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user