ensuring vars
This commit is contained in:
parent
100a2986b9
commit
a007fce913
@ -163,7 +163,7 @@ function errorMessageWithContext(err) {
|
||||
}
|
||||
|
||||
function logErrors(errors, statusCode, res) {
|
||||
const errorsCopy = errors.slice(0);
|
||||
let errorsCopy = errors.slice(0);
|
||||
|
||||
if(!errorsCopy || !errorsCopy.length) {
|
||||
return;
|
||||
@ -171,7 +171,7 @@ function logErrors(errors, statusCode, res) {
|
||||
|
||||
const mainError = errorsCopy.shift();
|
||||
|
||||
const errorsLog = {
|
||||
let errorsLog = {
|
||||
statusCode: statusCode || 200,
|
||||
message: mainError.message,
|
||||
name: mainError.name,
|
||||
|
Loading…
Reference in New Issue
Block a user