Node.js · Junior · Question 68 of 75

What happens when an error is thrown and nothing catches it?

Explanation

After an uncaught exception the app may be in a broken state, so the safe approach is to log it and let a process manager (systemd, Docker, Kubernetes, PM2) restart the app.

Further reading

Problem with a question

Node.js · Junior · question 68

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz