Node.js · Middle · Question 35 of 75

What is a good way to return API errors in a consistent format?

Explanation

Use correct status codes and a predictable error body. Never send stack traces or internal messages to clients in production.

Further reading

Problem with a question

Node.js · Middle · question 35

Test yourself

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

Take this quiz