Skip to content

docs(fastify): Fix imports in error handler snippet - #19426

Draft
chargome wants to merge 3 commits into
masterfrom
fastify-manual-setup
Draft

chargome wants to merge 3 commits into
masterfrom
fastify-manual-setup

Conversation

@chargome

@chargome chargome commented Sep 15, 2026

Copy link
Copy Markdown
Member

Rewrites the Fastify error handler page for v11. setupFastifyErrorHandler is a deprecated no-op in v11, so the page now documents only the happy path: errors are captured by fastifyIntegration, which is enabled by default, and shouldHandleError is configured on the integration.

This also removes the old snippet's import of @sentry/fastify, a package that does not exist.

Closes https://linear.app/getsentry/issue/SDK-1496/fastify-getting-started-manual-setup

The error handler page imported setupFastifyErrorHandler from @sentry/fastify, a package
that does not exist, and called fastify() without importing it. Use the @sentry/node
namespace import and import Fastify.

Fixes SDK-1496
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome chargome self-assigned this Sep 15, 2026
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Sep 17, 2026 12:16pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Sep 17, 2026 12:16pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 15, 2026

Copy link
Copy Markdown

SDK-1496

@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Sep 15, 2026
The handler-level shouldHandleError option is deprecated since 10.x and is removed in
11.0.0. Document the option on fastifyIntegration, which applies to every supported
Fastify version, and flag the deprecated form.

Refs SDK-1496
setupFastifyErrorHandler is a deprecated no-op in v11, so document the happy path only:
errors are captured by the default-enabled fastifyIntegration, and shouldHandleError is
configured on the integration.

Refs SDK-1496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

js-v11-docs Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant