change funcion name
This commit is contained in:
parent
1eae2e4790
commit
61b351535c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user