diff --git a/sections/errorhandling/centralizedhandling.md b/sections/errorhandling/centralizedhandling.md index d674b72e..b0574743 100644 --- a/sections/errorhandling/centralizedhandling.md +++ b/sections/errorhandling/centralizedhandling.md @@ -35,11 +35,11 @@ app.use(async (err, req, res, next) => { process.on("uncaughtException", error => { errorHandler.handleError(error); - }); +}); - process.on("unhandledRejection", (reason) => { - errorHandler.handleError(reason); - }); +process.on("unhandledRejection", (reason) => { + errorHandler.handleError(reason); +}); ``` @@ -72,11 +72,11 @@ await errorHandler.handleError(err, res); process.on("uncaughtException", (error:Error) => { errorHandler.handleError(error); - }); +}); - process.on("unhandledRejection", (reason) => { - errorHandler.handleError(reason); - }); +process.on("unhandledRejection", (reason) => { + errorHandler.handleError(reason); +}); ```