Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to handle all error of all router in express

const handleErrorAsync = func => (req, res, next) => {
    func(req, res, next).catch((error) => next(error));
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #handle #error #router #express
ADD COMMENT
Topic
Name
1+9 =