Skip to content

ref!(node): Remove Fastify error handler setter - #23411

Merged
s1gr1d merged 3 commits into
developfrom
sig/fastify-option
Aug 27, 2026
Merged

ref!(node): Remove Fastify error handler setter#23411
s1gr1d merged 3 commits into
developfrom
sig/fastify-option

Conversation

@s1gr1d

@s1gr1ds1gr1d commented Aug 13, 2026

Copy link
Copy Markdown
Member

Error filtering is now configured exclusively through fastifyIntegration({ shouldHandleError }). setupFastifyErrorHandler no longer accepts handler options.

closes#22253

@s1gr1d
s1gr1d requested a review from a team as a code ownerAugust 13, 2026 15:13
@s1gr1d
s1gr1d requested review from logaretm, nicohrubec and stephanie-anderson and removed request for a team and stephanie-andersonAugust 13, 2026 15:13
@github-actions

github-actionsBot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser28.57 kB--
@sentry/browser - with treeshaking flags26.92 kB--
@sentry/browser - with treeshaking flags tracing without tracing26.82 kB--
@sentry/browser (incl. Tracing)48.63 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.65 kB--
@sentry/browser (incl. Tracing, Profiling)51.56 kB--
@sentry/browser (incl. Tracing, Replay)88.11 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags77.51 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)92.82 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)105.51 kB--
@sentry/browser (incl. Feedback)45.79 kB--
@sentry/browser (incl. sendFeedback)33.35 kB--
@sentry/browser (incl. FeedbackAsync)38.46 kB--
@sentry/browser (incl. Metrics)29.51 kB--
@sentry/browser (incl. Logs)29.8 kB--
@sentry/browser (incl. Metrics & Logs)30.43 kB--
@sentry/react30.31 kB--
@sentry/react (incl. Tracing)50.84 kB--
@sentry/vue35.69 kB--
@sentry/vue (incl. Tracing)50.88 kB--
@sentry/svelte28.59 kB--
CDN Bundle30.36 kB--
CDN Bundle (incl. Tracing)49.12 kB--
CDN Bundle (incl. Logs, Metrics)32.56 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)51.01 kB--
CDN Bundle (incl. Replay, Logs, Metrics)73 kB--
CDN Bundle (incl. Tracing, Replay)86.62 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)88.52 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)92.4 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)94.33 kB--
CDN Bundle - uncompressed89.97 kB--
CDN Bundle (incl. Tracing) - uncompressed146.82 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed96.26 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed152.51 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed225.42 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed266.32 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed272 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed280.01 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed285.68 kB--
@sentry/nextjs (client)53.41 kB--
@sentry/sveltekit (client)49.08 kB--
@sentry/core/server65.3 kB--
@sentry/core/browser52.37 kB--
@sentry/node122.34 kB+0.01%+12 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection)85.22 kB--
@sentry/node - without tracing87.66 kB+0.02%+15 B 🔺
@sentry/node - without channel injection102.04 kB+0.01%+10 B 🔺
@sentry/aws-serverless95.82 kB+0.02%+17 B 🔺
@sentry/cloudflare (withSentry) - minified199.57 kB--
@sentry/cloudflare (withSentry)495.71 kB--

View base workflow run

@github-actions

Copy link
Copy Markdown
Contributor

👋 @logaretm, @nicohrubec — Please review this PR when you get a chance!

@s1gr1d

Copy link
Copy Markdown
MemberAuthor

btw, I will wait with merging after the PR to deprecate setupFastifyErrorHandler is merged: #23460

Resolves conflicts with #23460, which consolidated Fastify onto a single
channel-based `fastifyIntegration` and moved everything out of
`packages/node/src/integrations/tracing/fastify/`.
Conflict resolutions (all modify/delete — upstream deletion accepted):
- The three e2e `app-handle-error-override.ts` apps: #23460 deleted them
and moved override coverage into node-integration-tests.
- `packages/node/src/integrations/tracing/fastify/index.ts`: deleted, the
integration now lives in `@sentry/server-utils`.
- `docs/migration/v11-end-state.md`: deleted by #23623, which folded the
guide into MIGRATION.md. The Fastify entries were ported there.
Reapplied on top: `setupFastifyErrorHandler` no longer accepts
`shouldHandleError`. After removing `setShouldHandleError`, forwarding the
option was the shim's only remaining job, so it is now a deprecated no-op
kept purely so existing `setupFastifyErrorHandler(app)` calls do not break.
The node-integration-test that covered the option was repointed at
`fastifyIntegration({ shouldHandleError })`.
Co-Authored-By: Opus 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d requested a review from a team as a code ownerAugust 27, 2026 09:13
@s1gr1d
s1gr1d requested review from JPeer264 and isaacs and removed request for a teamAugust 27, 2026 09:13
@s1gr1d
s1gr1d merged commit 6b6f319 into developAug 27, 2026
201 of 202 checks passed
@s1gr1d
s1gr1d deleted the sig/fastify-option branch August 27, 2026 10:40
s1gr1d added a commit that referenced this pull request Aug 31, 2026
…ndler` and `setupFasitfyErrorHandler` (#23734)
Express:
- #23732
- #23464
- #23763
Fastify:
- #23460
- #23464
- #23411
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fastify: remove setShouldHandleError

3 participants

@s1gr1d@nicohrubec@andreiborza