Next.js · Middle · Question 65 of 75

What is catchError from next/error for?

Explanation

It's a programmatic alternative to error.tsx that can wrap any part of the tree. It doesn't swallow Next.js control-flow errors and clears on navigation.

Further reading

Problem with a question

Next.js · Middle · question 65

Test yourself

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

Take this quiz