Unverified Commit d422aeb5 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

tweak postpone error copy & fix link (#58219)

Fixes a broken link, shortens the title, and adds another possible way
to resolve the error.
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 67656c3f
---
title: Understanding the postpone error triggered during static generation
title: Static Generation Postpone Error
---
## Why This Error Occurred
......@@ -8,6 +8,6 @@ When Partial Prerendering (PPR) is enabled, using APIs that opt into Dynamic Ren
## Possible Ways to Fix It
To resolve this issue, ensure that you are not wrapping Next.js APIs that opt into dynamic rendering in a `try/catch` block.
If you do wrap these APIs in a try/catch, make sure you re-throw the original error so it can be caught by Next.
- Ensure that you are not wrapping Next.js APIs that opt into dynamic rendering in a `try/catch` block.
- If you do wrap these APIs in a try/catch, make sure you re-throw the original error so it can be caught by Next.js.
- Alternatively, insert [`unstable_noStore()`](docs/app/api-reference/functions/unstable_noStore) before the try/catch.
......@@ -1029,7 +1029,7 @@ async function renderToHTMLOrFlightImpl(
// as we won't be able to generate the static part
warn('')
error(
`Postpone signal was caught while rendering ${urlPathname}. Check to see if you're try/catching a Next.js API such as headers / cookies, or a fetch with "no-store". Learn more: https://nextjs.org/docs/messages/ppr-postpone-errors`
`Postpone signal was caught while rendering ${urlPathname}. Check to see if you're try/catching a Next.js API such as headers / cookies, or a fetch with "no-store". Learn more: https://nextjs.org/docs/messages/ppr-postpone-error`
)
if (capturedErrors.length > 0) {
......
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