diff --git a/app/utils/error_handler.js b/app/utils/error_handler.js index a9aa43c0..5aa8203a 100644 --- a/app/utils/error_handler.js +++ b/app/utils/error_handler.js @@ -32,7 +32,7 @@ module.exports = function handleException(err, res) { res.header('X-SQLAPI-Profiler', req.profiler.toJSONString()); } - logErrors(msg, pgErrorHandler.getStatus(), res); + setErrorHeader(msg, pgErrorHandler.getStatus(), res); res.header('Content-Type', 'application/json; charset=utf-8'); res.status(getStatusError(pgErrorHandler, req)); @@ -59,7 +59,7 @@ function getStatusError(pgErrorHandler, req) { return statusError; } -function logErrors(err, statusCode, res) { +function setErrorHeader(err, statusCode, res) { let errorsLog = Object.assign({}, err); errorsLog.statusCode = statusCode || 200;