diff --git a/src/handlers/clientErrorHandler.js b/src/handlers/clientErrorHandler.js index ee85d86..2a44649 100644 --- a/src/handlers/clientErrorHandler.js +++ b/src/handlers/clientErrorHandler.js @@ -183,7 +183,7 @@ function clientErrorHandler(err, socket) { fs.access( "." + errorCode.toString(), fs.constants.F_OK, - function (err) { + (err) => { try { if (err) { callback(errorCode.toString() + ".html"); @@ -207,7 +207,7 @@ function clientErrorHandler(err, socket) { fs.access( "." + errorCode.toString(), fs.constants.F_OK, - function (err) { + (err) => { try { if (err) { callback(errorCode.toString() + ".html"); diff --git a/src/handlers/requestHandler.js b/src/handlers/requestHandler.js index c756ee7..6b8ed30 100644 --- a/src/handlers/requestHandler.js +++ b/src/handlers/requestHandler.js @@ -343,8 +343,8 @@ function requestHandler(req, res) { } // Determine error file - function getErrorFileName(list, callback, _i) { - function medCallback(p) { + const getErrorFileName = (list, callback, _i) => { + const medCallback = (p) => { if (p) callback(p); else { if (errorCode == 404) { @@ -353,7 +353,7 @@ function requestHandler(req, res) { fs.access( "." + errorCode.toString(), fs.constants.F_OK, - function (err) { + (err) => { try { if (err) { callback(errorCode.toString() + ".html"); @@ -377,7 +377,7 @@ function requestHandler(req, res) { fs.access( "." + errorCode.toString(), fs.constants.F_OK, - function (err) { + (err) => { try { if (err) { callback(errorCode.toString() + ".html");