Skip to content

docs: update details about unstable_retry() behavior#91827

Merged
devjiwonchoi merged 5 commits into
canaryfrom
jiwon-2026-03-23/docs-catcherror-recovery-wording
Apr 9, 2026
Merged

docs: update details about unstable_retry() behavior#91827
devjiwonchoi merged 5 commits into
canaryfrom
jiwon-2026-03-23/docs-catcherror-recovery-wording

Conversation

@devjiwonchoi

Copy link
Copy Markdown
Member

Summary

  • Updated the "Built-in error recovery" bullet in catchError docs to say "retries rendering the error boundary's children with fresh data in Server Components" instead of "re-fetches and re-renders the error boundary's children, including Server Components"

@nextjs-bot nextjs-bot added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. labels Mar 23, 2026
Comment thread docs/01-app/03-api-reference/04-functions/catchError.mdx Outdated
@devjiwonchoi devjiwonchoi marked this pull request as ready for review March 23, 2026 15:59
@devjiwonchoi devjiwonchoi requested a review from icyJoseph March 23, 2026 15:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2018f412d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Compared to a custom React error boundary, `unstable_catchError` is designed to work with Next.js out of the box:

- **Built-in error recovery** — [`unstable_retry()`](/docs/app/api-reference/file-conventions/error#unstable_retry) re-fetches and re-renders the error boundary's children, including Server Components.
- **Built-in error recovery** — [`unstable_retry()`](/docs/app/api-reference/file-conventions/error#unstable_retry) retries rendering the page with fresh data in Server Components from the root.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid promising fresh data from unstable_retry

This wording overstates what unstable_retry() does: in the App Router implementation it calls router.refresh(), which issues a new request but does not invalidate server-side cache, so cached fetch results can be reused. In apps that rely on cache invalidation (revalidatePath/revalidateTag), readers may expect retry to always return fresh data and misdiagnose recovery behavior when the same cached data is rendered again.

Useful? React with 👍 / 👎.

Comment thread docs/01-app/03-api-reference/04-functions/catchError.mdx Outdated
@devjiwonchoi

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/01-app/03-api-reference/04-functions/catchError.mdx Outdated
@devjiwonchoi devjiwonchoi changed the title docs: update catchError built-in error recovery wording docs: update details about unstable_retry() behavior Mar 24, 2026
Comment thread docs/01-app/03-api-reference/04-functions/catchError.mdx Outdated
@devjiwonchoi devjiwonchoi merged commit 4e3f35b into canary Apr 9, 2026
75 checks passed
@devjiwonchoi devjiwonchoi deleted the jiwon-2026-03-23/docs-catcherror-recovery-wording branch April 9, 2026 10:59
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants