Skip to content

docs: unstable_catchError()#89847

Merged
devjiwonchoi merged 2 commits intocanaryfrom
jiwon/02-11-docs_catcherror_
Mar 17, 2026
Merged

docs: unstable_catchError()#89847
devjiwonchoi merged 2 commits intocanaryfrom
jiwon/02-11-docs_catcherror_

Conversation

@devjiwonchoi
Copy link
Member

@devjiwonchoi devjiwonchoi commented Feb 11, 2026

Docs for #89688

@nextjs-bot nextjs-bot added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. labels Feb 11, 2026
Copy link
Member Author

devjiwonchoi commented Feb 11, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

All broken links are now fixed, thank you!

@devjiwonchoi devjiwonchoi changed the base branch from canary to graphite-base/89847 February 11, 2026 19:08
@devjiwonchoi devjiwonchoi force-pushed the jiwon/02-11-docs_catcherror_ branch from 41c89a9 to e52b64a Compare February 11, 2026 19:08
@devjiwonchoi devjiwonchoi changed the base branch from graphite-base/89847 to jiwon/02-09-docs_error_component_retry_ February 11, 2026 19:08
@devjiwonchoi devjiwonchoi marked this pull request as ready for review February 11, 2026 19:09
@devjiwonchoi devjiwonchoi force-pushed the jiwon/02-11-docs_catcherror_ branch from e52b64a to 780de1b Compare February 11, 2026 19:12
Base automatically changed from jiwon/02-09-docs_error_component_retry_ to canary March 2, 2026 16:43
devjiwonchoi added a commit that referenced this pull request Mar 16, 2026
This PR adds `unstable_catchError()` API for a granular custom error
boundary. The error component generated by this API is not a true
component format, as the wrapper provides additional args. Therefore,
the API is a function call by design rather than a boundary component to
avoid merging the `errorInfo` with the user-provided props from the
wrapper.

This API works for both the App/Pages Router. However, `retry()` is not
allowed in Pages Router as it depends on `router.refresh()`, and will
throw. Also, it's exported from `next/error` as there was already an
`Error` component for the [Pages
Router](https://nextjs.org/docs/pages/building-your-application/routing/custom-error#reusing-the-built-in-error-page).

### DevTools

<img width="508" height="90" alt="CleanShot 2026-03-13 at 03 02 46@2x"
src="https://github.com/user-attachments/assets/8b79b1f6-877d-4901-99f7-6a2b4d3e34fe"
/>

Docs to follow up: #89847
Closes NAR-768

---------

Co-authored-by: Josh Story <story@hey.com>
@devjiwonchoi devjiwonchoi force-pushed the jiwon/02-11-docs_catcherror_ branch 3 times, most recently from 53d599a to 4b3e2a6 Compare March 16, 2026 23:31
@devjiwonchoi devjiwonchoi changed the title docs: catchError() docs: unstable_catchError() Mar 16, 2026
@devjiwonchoi
Copy link
Member Author

@codex review

Copy link

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

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: 4b3e2a68be

ℹ️ 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".

@devjiwonchoi devjiwonchoi force-pushed the jiwon/02-11-docs_catcherror_ branch from 4b3e2a6 to da78b91 Compare March 16, 2026 23:45
@devjiwonchoi
Copy link
Member Author

@codex review

Copy link

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

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: da78b91edc

ℹ️ 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".

@devjiwonchoi devjiwonchoi force-pushed the jiwon/02-11-docs_catcherror_ branch from da78b91 to cd73cfe Compare March 16, 2026 23:54
@devjiwonchoi
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ 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".

@devjiwonchoi devjiwonchoi requested a review from icyJoseph March 17, 2026 00:12
@devjiwonchoi devjiwonchoi merged commit 66bbcb5 into canary Mar 17, 2026
73 checks passed
@devjiwonchoi devjiwonchoi deleted the jiwon/02-11-docs_catcherror_ branch March 17, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants