Skip to content

Commit 4f15713

Browse files
committed
Update Next.js error handling documentation and add new examples
- Refactor error handling examples for App Router and Pages Router to include Next.js-specific paths. - Introduce new documentation for custom global error components and error handling in nested React Server Components. - Remove outdated Hono and NestJS error handling documentation. - Add new files for capturing errors in Next.js App Router and Pages Router. This update enhances clarity and organization in the error handling section of the Next.js documentation.
1 parent d19247a commit 4f15713

File tree

7 files changed

+6
-124
lines changed

7 files changed

+6
-124
lines changed

docs/platforms/javascript/guides/nextjs/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ Make sure runtime errors are surfaced to Sentry using Next.js error components.
148148

149149
### App Router
150150

151-
<PlatformContent includePath="getting-started-capture-errors/app-router-global-error" />
151+
<PlatformContent includePath="getting-started-capture-errors/nextjs/app-router-global-error" />
152152

153153
#### Errors from Nested React Server Components
154154

155-
<PlatformContent includePath="getting-started-capture-errors/nested-server-components" />
155+
<PlatformContent includePath="getting-started-capture-errors/nextjs/nested-server-components" />
156156

157157
### Pages Router
158158

159-
<PlatformContent includePath="getting-started-capture-errors/pages-router-error" />
159+
<PlatformContent includePath="getting-started-capture-errors/nextjs/pages-router-error" />
160160

161161
<Alert level="info">
162162
The installation wizard will scaffold these files for you if they are missing.

docs/platforms/javascript/guides/nextjs/manual-setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ To capture React render errors, you need to add error components for the App Rou
263263

264264
### App Router
265265

266-
<PlatformContent includePath="getting-started-capture-errors/app-router-global-error" />
266+
<PlatformContent includePath="getting-started-capture-errors/nextjs/app-router-global-error" />
267267

268268
#### Errors from Nested React Server Components
269269

270-
<PlatformContent includePath="getting-started-capture-errors/nested-server-components" />
270+
<PlatformContent includePath="getting-started-capture-errors/nextjs/nested-server-components" />
271271

272272
### Pages Router
273273

274-
<PlatformContent includePath="getting-started-capture-errors/pages-router-error" />
274+
<PlatformContent includePath="getting-started-capture-errors/nextjs/pages-router-error" />
275275

276276
## Step 4: Add Readable Stack Traces With Source Maps (Optional)
277277

platform-includes/getting-started-capture-errors/javascript.hono.mdx

Lines changed: 0 additions & 34 deletions
This file was deleted.

platform-includes/getting-started-capture-errors/javascript.nestjs.mdx

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)