change funcion name
This commit is contained in:
parent
555d3f558c
commit
e0d4a9e596
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user