Unverified Commit 2d4dbcdf authored by Delba de Oliveira's avatar Delba de Oliveira Committed by GitHub

Docs: Add note about calling redirect after `try/catch` (#61138)

Closes: https://github.com/vercel/next.js/issues/60448
parent d7ff67de
......@@ -12,7 +12,10 @@ When used in a [streaming context](/docs/app/building-your-application/routing/l
If a resource doesn't exist, you can use the [`notFound` function](/docs/app/api-reference/functions/not-found) instead.
> **Good to know**: If you prefer to return a 308 (Permanent) HTTP redirect instead of 307 (Temporary), you can use the [`permanentRedirect` function](/docs/app/api-reference/functions/permanentRedirect) instead.
> **Good to know**:
>
> - In Server Actions and Route Handlers, `redirect` should be called after the `try/catch` block.
> - If you prefer to return a 308 (Permanent) HTTP redirect instead of 307 (Temporary), you can use the [`permanentRedirect` function](/docs/app/api-reference/functions/permanentRedirect) instead.
## Parameters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment