Need Assistance?

support@tutorialshub.in

Error Handling & Debugging

Synchronous vs Asynchronous Errors

ADVERTISEMENT
Express.js Free Lesson
5 min read
ADVERTISEMENT

In Express 4, synchronous errors thrown inside a route handler are caught automatically by Express. However, errors inside async/await functions or Promises must be passed to next(err) (or handled via Express 5 / a wrapper function) so your app doesn't crash or hang.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you