Skip to Main Content
Node.js for Beginners
book

Node.js for Beginners

by Ulises Gascón
May 2024
Beginner to intermediate content levelBeginner to intermediate
382 pages
7h 59m
English
Packt Publishing
Content preview from Node.js for Beginners

14

Error Handling in Node.js

Node.js applications require solid and consistent control over errors. Most applications are built using many dependencies or heavily rely on asynchronous operations (network, disk, and so on), which makes error management more complex.

In this chapter, we will learn about the different types of errors that we can encounter in a Node.js application and how to handle them properly. We will also learn how to throw custom errors and how to capture and resume the application from any kind of error, including the ones that occur in Express applications.

We will also learn how to manage a graceful shutdown when the service crashes, how to use exit codes according to the situation, and how to prevent zombie processes. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Node.js: Novice to Ninja

Node.js: Novice to Ninja

Craig Buckler
Node.js - The Complete Guide

Node.js - The Complete Guide

Academind by Maximilian Schwarzmüller GmbH
JavaScript from Beginner to Professional

JavaScript from Beginner to Professional

Rob Percival, Laurence Svekis, Maaike van Putten, Codestars By Rob Percival

Publisher Resources

ISBN: 9781803245171Supplemental Content