Next.js · sdk · fg-0310

redirect() in a Server Action does nothing, or logs NEXT_REDIRECT, when it sits inside try/catch

If you see Error: NEXT_REDIRECT, the cause and the fix for Next.js are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
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

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun