In this chapter, we will learn how to handle errors in the Express applications. More specifically, the following topics will be covered:
Error categories—runtime and programmer errors
Synchronous, asynchronous, and eventful errors
Writing a custom Express error handler
Return errors, not strings
Handling uncaught exceptions
Longer stack traces
Most of these topics not only apply to the Express applications but also to the Node applications in general, so try not to skim through this chapter. To make it more interesting, we will be creating a Wall microblogging application (from scratch), where people can publish posts and be notified in real time about the updates.