change funcion name

This commit is contained in:
Simon Martín 2017-11-30 15:04:07 +01:00
parent 555d3f558c
commit e0d4a9e596

View File

@ -19,7 +19,7 @@ module.exports = function errorMiddleware (/* options */) {
statusCode = 204;
}
logErrors(allErrors, statusCode, res);
setErrorHeader(allErrors, statusCode, res);
debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack);
// If a callback was requested, force status to 200
@ -162,7 +162,7 @@ function errorMessageWithContext(err) {
return error;
}
function logErrors(errors, statusCode, res) {
function setErrorHeader(errors, statusCode, res) {
let errorsCopy = errors.slice(0);
const mainError = errorsCopy.shift();