mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix errorHandler tests, add tests for res.respond
This commit is contained in:
@@ -8,9 +8,7 @@ import {
|
||||
} from '../../libs/api-v3/errors';
|
||||
import { map } from 'lodash';
|
||||
|
||||
export default function errorHandler (err, req, res, next) {
|
||||
if (!err) return next();
|
||||
|
||||
export default function errorHandler (err, req, res, next) { // eslint-disable-line no-unused-vars
|
||||
// Log the original error with some metadata
|
||||
let stack = err.stack || err.message || err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user