- Symptom
- Error: NEXT_REDIRECTThe action finishes but the browser stays on the same pageThe catch block reports a failure for a request that succeeded
- Cause
- redirect(), permanentRedirect() and notFound() work by throwing a special error that the framework catches higher up. A surrounding try/catch intercepts it first, so the navigation never happens.
- Fix
- Call redirect() after the try/catch block, or rethrow framework errors at the top of the catch with unstable_rethrow.
- Apply
import { redirect, unstable_rethrow } from 'next/navigation' try { await save(data) } catch (err) { unstable_rethrow(err) return { error: 'Save failed' } } redirect('/done')- Affected
- Next.js App Router 13.4 to 16.4, Server Actions, Route Handlers and Server Components
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders