Next.js 16+ · Function
catchError
catchError creates a component-level error boundary in the App Router. It shows fallback UI for child errors and supports recovery with retry().
Last updated
- Since
- v16.2.0 (unstable_catchError); stable in v16.3.0
Syntax
const ErrorWrapper = catchError(fallback)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
ErrorInforetryreseterror.jsredirect()notFound()