diff --git a/lib/cartodb/middleware/error-middleware.js b/lib/cartodb/middleware/error-middleware.js index 7de64d68..f3f2eb36 100644 --- a/lib/cartodb/middleware/error-middleware.js +++ b/lib/cartodb/middleware/error-middleware.js @@ -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();