change funcion name

This commit is contained in:
Simon Martín 2017-11-30 15:06:25 +01:00
parent 1eae2e4790
commit 61b351535c

View File

@ -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;