Skip to content

Docs IA 2.0: Delete Error Handling page #79495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/01-app/02-guides/incremental-static-regeneration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ If you are using on-demand revalidation, you do not need to specify a `revalidat

<AppOnly>

If an error is thrown while attempting to revalidate data, the last successfully generated data will continue to be served from the cache. On the next subsequent request, Next.js will retry revalidating the data. [Learn more about error handling](/docs/app/building-your-application/routing/error-handling).
If an error is thrown while attempting to revalidate data, the last successfully generated data will continue to be served from the cache. On the next subsequent request, Next.js will retry revalidating the data. [Learn more about error handling](/docs/app/getting-started/error-handling).

</AppOnly>

Expand Down
4 changes: 2 additions & 2 deletions docs/01-app/02-guides/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ description: Learn how to implement common UI patterns and use cases using Next.

- [Showing a pending state while submitting a form](/docs/app/guides/forms)
- [Server-side form validation](/docs/app/guides/forms)
- [Handling expected errors](/docs/app/building-your-application/routing/error-handling#handling-expected-errors-from-server-actions)
- [Handling unexpected exceptions](/docs/app/building-your-application/routing/error-handling#uncaught-exceptions)
- [Handling expected errors](/docs/app/getting-started/error-handling#handling-expected-errors)
- [Handling unexpected exceptions](/docs/app/getting-started/error-handling#handling-uncaught-exceptions)
- [Showing optimistic UI updates](/docs/app/guides/forms#optimistic-updates)
- [Programmatic form submission](/docs/app/guides/forms#programmatic-form-submission)

Expand Down
2 changes: 1 addition & 1 deletion docs/01-app/02-guides/migrating/app-router-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ We recommend reducing the combined complexity of these updates by breaking down
- You can colocate other files inside the `app` directory such as components, styles, tests, and more. [Learn more](/docs/app/building-your-application/routing).
- Data fetching functions like `getServerSideProps` and `getStaticProps` have been replaced with [a new API](/docs/app/building-your-application/data-fetching) inside `app`. `getStaticPaths` has been replaced with [`generateStaticParams`](/docs/app/api-reference/functions/generate-static-params).
- `pages/_app.js` and `pages/_document.js` have been replaced with a single `app/layout.js` root layout. [Learn more](/docs/app/api-reference/file-conventions/layout#root-layout).
- `pages/_error.js` has been replaced with more granular `error.js` special files. [Learn more](/docs/app/building-your-application/routing/error-handling).
- `pages/_error.js` has been replaced with more granular `error.js` special files. [Learn more](/docs/app/getting-started/error-handling).
- `pages/404.js` has been replaced with the [`not-found.js`](/docs/app/api-reference/file-conventions/not-found) file.
- `pages/api/*` API Routes have been replaced with the [`route.js`](/docs/app/api-reference/file-conventions/route) (Route Handler) special file.

Expand Down
2 changes: 1 addition & 1 deletion docs/01-app/02-guides/production-checklist.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ While building your application, we recommend using the following features to en

- **[Layouts](/docs/app/api-reference/file-conventions/layout):** Use layouts to share UI across pages and enable [partial rendering](/docs/app/building-your-application/routing/linking-and-navigating#4-partial-rendering) on navigation.
- **[`<Link>` component](/docs/app/building-your-application/routing/linking-and-navigating#link-component):** Use the `<Link>` component for [client-side navigation and prefetching](/docs/app/building-your-application/routing/linking-and-navigating#how-routing-and-navigation-works).
- **[Error Handling](/docs/app/building-your-application/routing/error-handling):** Gracefully handle [catch-all errors](/docs/app/building-your-application/routing/error-handling) and [404 errors](/docs/app/api-reference/file-conventions/not-found) in production by creating custom error pages.
- **[Error Handling](/docs/app/getting-started/error-handling):** Gracefully handle [catch-all errors](/docs/app/getting-started/error-handling) and [404 errors](/docs/app/api-reference/file-conventions/not-found) in production by creating custom error pages.
- **[Client and Server Components](/docs/app/getting-started/server-and-client-components#examples):** Follow the recommended composition patterns for Server and Client Components, and check the placement of your [`"use client"` boundaries](/docs/app/getting-started/server-and-client-components#examples#moving-client-components-down-the-tree) to avoid unnecessarily increasing your client-side JavaScript bundle.
- **[Dynamic APIs](/docs/app/getting-started/partial-prerendering#dynamic-rendering):** Be aware that Dynamic APIs like [`cookies`](/docs/app/api-reference/functions/cookies) and the [`searchParams`](/docs/app/api-reference/file-conventions/page#searchparams-optional) prop will opt the entire route into [Dynamic Rendering](/docs/app/getting-started/partial-prerendering#dynamic-rendering) (or your whole application if used in the [Root Layout](/docs/app/api-reference/file-conventions/layout#root-layout)). Ensure Dynamic API usage is intentional and wrap them in `<Suspense>` boundaries where appropriate.

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Remember to consider the [behavior and caveats](https://react.dev/reference/reac

### Error Handling

When an error is thrown, it'll be caught by the nearest `error.js` or `<Suspense>` boundary on the client. See [Error Handling](/docs/app/building-your-application/routing/error-handling) for more information.
When an error is thrown, it'll be caught by the nearest `error.js` or `<Suspense>` boundary on the client. See [Error Handling](/docs/app/getting-started/error-handling) for more information.

> **Good to know:**
>
Expand Down
2 changes: 1 addition & 1 deletion docs/01-app/05-api-reference/03-file-conventions/error.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: API reference for the error.js special file.
related:
title: Learn more about error handling
links:
- app/building-your-application/routing/error-handling
- app/getting-started/error-handling
---

An **error** file allows you to handle unexpected runtime errors and display fallback UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function RootLayout({ children }) {

#### `children` (required)

Layout components accept and use a `children` prop. During rendering, `children` will be populated with the route segments the layout is wrapping. These will primarily be the component of a child [Layout](/docs/app/api-reference/file-conventions/page) (if it exists) or [Page](/docs/app/api-reference/file-conventions/page), but could also be other special files like [Loading](/docs/app/building-your-application/routing/loading-ui-and-streaming) or [Error](/docs/app/building-your-application/routing/error-handling) when applicable.
Layout components should accept and use a `children` prop. During rendering, `children` will be populated with the route segments the layout is wrapping. These will primarily be the component of a child [Layout](/docs/app/api-reference/file-conventions/page) (if it exists) or [Page](/docs/app/api-reference/file-conventions/page), but could also be other special files like [Loading](/docs/app/building-your-application/routing/loading-ui-and-streaming) or [Error](/docs/app/getting-started/error-handling) when applicable.

#### `params` (optional)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,4 +477,4 @@ Parallel Routes can be streamed independently, allowing you to define independen
height="1218"
/>

See the [Loading UI](/docs/app/building-your-application/routing/loading-ui-and-streaming) and [Error Handling](/docs/app/building-your-application/routing/error-handling) documentation for more information.
See the [Loading UI](/docs/app/building-your-application/routing/loading-ui-and-streaming) and [Error Handling](/docs/app/getting-started/error-handling) documentation for more information.
2 changes: 1 addition & 1 deletion errors/prerender-error.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function Page() {

## Additional Resources

- [Handling Errors in Next.js](/docs/app/building-your-application/routing/error-handling)
- [Handling Errors in Next.js](/docs/app/getting-started/error-handling)
- [Data Fetching in Next.js](/docs/app/getting-started/fetching-data)

If you continue to experience issues after trying these solutions, consider checking your server logs for more detailed error messages or reaching out to the Next.js community for support.
Loading