Next.js · Middle · Question 65 of 75
What is catchError from next/error for?
- ✓Correct answer: Creating a component-level error boundary that works with
redirect()/notFound()and offersretry() - 2Logging server errors to a file
- 3Catching errors in
proxy.ts
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.