next.js
6a3cf226 - docs: warn when catching permanentRedirect (#97496)

Commit
15 days ago
docs: warn when catching permanentRedirect (#97496) ## Summary Document that `permanentRedirect()` throws and should be called outside a broad `try/catch` block. The `redirect()` and `notFound()` references already explain this control-flow requirement. The `permanentRedirect()` reference omits it, so application error handling can accidentally suppress the redirect. Align the page with the `redirect()` reference by adding a dedicated Behavior section for the try/catch guidance and temporary-redirect cross-link. ## Verification - Prettier, ESLint, and `git diff --check` (cherry picked from commit f0088acc7daac3222d8d43ea593cf6dc6c7bc746)
Author
Committer
Parents
Loading