diff --git a/handlers/errorHandlers.js b/handlers/errorHandlers.js index 993b2a5..48465e4 100644 --- a/handlers/errorHandlers.js +++ b/handlers/errorHandlers.js @@ -1,8 +1,8 @@ /* Catch Errors Handler - With async/await, you need some way to catch errors + With async/await, you need some way to catch errors. Instead of using try{} catch(e) {} in each controller, we wrap the function in - catchErrors(), catch and errors they throw, and pass it along to our express middleware with next() + catchErrors(), catch any errors they throw, and pass it along to our express middleware with next(). */ exports.catchErrors = (fn) => {