René's URL Explorer Experiment


Title: How to prevent handleFastifyError.handleFastifyError errors in Sentry? · Issue #17119 · getsentry/sentry-javascript · GitHub

Open Graph Title: How to prevent handleFastifyError.handleFastifyError errors in Sentry? · Issue #17119 · getsentry/sentry-javascript

X Title: How to prevent handleFastifyError.handleFastifyError errors in Sentry? · Issue #17119 · getsentry/sentry-javascript

Description: Problem Statement In my route handles, I throw Response objects like: throw Response.json( { error: { code, details, id: sentryErrorForeignId, message, }, } satisfies ApiErrorResponse, { headers, status, }, ); It works as expected with F...

Open Graph Description: Problem Statement In my route handles, I throw Response objects like: throw Response.json( { error: { code, details, id: sentryErrorForeignId, message, }, } satisfies ApiErrorResponse, { headers, s...

X Description: Problem Statement In my route handles, I throw Response objects like: throw Response.json( { error: { code, details, id: sentryErrorForeignId, message, }, } satisfies ApiErrorResponse, { headers, s...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17119

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to prevent handleFastifyError.handleFastifyError errors in Sentry?","articleBody":"### Problem Statement\n\nIn my route handles, I throw `Response` objects like:\n\n```\nthrow Response.json(\n    {\n      error: {\n        code,\n        details,\n        id: sentryErrorForeignId,\n        message,\n      },\n    } satisfies ApiErrorResponse,\n    {\n      headers,\n      status,\n    },\n  );\n``` \n\nIt works as expected with Fastify, but the problem is that Sentry is catching these as if they are errors.\n\nI get lots of these issues, like:\n\n```\nhandleFastifyError.handleFastifyError\nLevel: Error\n[object Response]\nGET /api/gateway/v1/models\n```\n\nwith this stack trace:\n\n```\n… es/.pnpm/@sentry+node@9.40.0/node_modules/@sentry/node/src/integrations/tracing/fastify/index.ts in handleFastifyError.handleFastifyError at line 87:5\n… es/.pnpm/@sentry+node@9.40.0/node_modules/@sentry/node/src/integrations/tracing/fastify/index.ts in \u003canonymous> at line 123:24\nnode:diagnostics_channel in Channel.publish at line 150:9\n/srv/node_modules/.pnpm/fastify@5.4.0/node_modules/fastify/lib/wrapThenable.js at line 55:22\n\nnode:internal/process/task_queues in process.processTicksAndRejections at line 105:5\n```\n\nhttps://glama.sentry.io/issues/6760827050/?project=4507975514849280&query=is%3Aunresolved&referrer=issue-stream\n\nI am already returning `false` from `shouldHandleError`:\n\n```\nsetupFastifyErrorHandler(app, {\n    shouldHandleError: () => {\n      // We are handling errors ourselves.\n      // We are only using `setupFastifyErrorHandler` to setup request isolation context.\n      return false;\n    },\n  });\n\n  app.setErrorHandler((error, request, reply) => {\n    return replyWithErrorPage({ error, origin: 'setErrorHandler', reply });\n  });\n```\n\n### Solution Brainstorm\n\nCome to think about it, this is likely a bug.\n\nOr maybe the ask is that at the moment `setupFastifyErrorHandler` is overloaded with error handling logic and also logic for starting a context for every request. It would be nice to separate out those two.","author":{"url":"https://github.com/punkpeye","@type":"Person","name":"punkpeye"},"datePublished":"2025-07-22T07:32:53Z","url":"https://github.com/getsentry/sentry-javascript/issues/17119"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:301bb3fd-fbb3-26a7-bdaa-7b802772c34f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB9FE:2B7A86:8A385:B8C62:6B05E728
html-safe-nonceabf3b0e2db80e48553a759e32fed5e6aac28313e205933e3fbe626e99755cd04
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUZFOjJCN0E4Njo4QTM4NTpCOEM2Mjo2QjA1RTcyOCIsInZpc2l0b3JfaWQiOiI4OTQ1OTI0NzA2MTc2MTk4NDQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac47777348f31f93c190fbebae464c3fe13bac1d7ee6263902a917cfe43482a978
hovercard-subject-tagissue:3251475928
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/17119/issue_layout
twitter:imagehttps://opengraph.githubassets.com/99388a207fb9152764dfafa338ccbff6c9f69d4f5c40897dd1da53aadf0004d4/getsentry/sentry-javascript/issues/17119
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/99388a207fb9152764dfafa338ccbff6c9f69d4f5c40897dd1da53aadf0004d4/getsentry/sentry-javascript/issues/17119
og:image:altProblem Statement In my route handles, I throw Response objects like: throw Response.json( { error: { code, details, id: sentryErrorForeignId, message, }, } satisfies ApiErrorResponse, { headers, s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepunkpeye
hostnamegithub.com
expected-hostnamegithub.com
None9e6b0e6e5a9a8e0ddb968297ede4e2eac72d30ea174a0970eb8f22d6958e91e3
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release023691d14ad20c90d3ee61b0a0977b17dc6b6361
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/17119#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F17119
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F17119
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/17119
Reloadhttps://github.com/getsentry/sentry-javascript/issues/17119
Reloadhttps://github.com/getsentry/sentry-javascript/issues/17119
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues329 (329)https://github.com/getsentry/sentry-javascript/issues
Pull requests57 (57)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/17119
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/17119
How to prevent handleFastifyError.handleFastifyError errors in Sentry?https://github.com/getsentry/sentry-javascript/issues/17119#top
https://github.com/Lms24
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com/punkpeye
punkpeyehttps://github.com/punkpeye
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issue-3251475928
https://glama.sentry.io/issues/6760827050/?project=4507975514849280&query=is%3Aunresolved&referrer=issue-streamhttps://glama.sentry.io/issues/6760827050/?project=4507975514849280&query=is%3Aunresolved&referrer=issue-stream
Nexthttps://github.com/getsentry/sentry-javascript/issues/17119?timeline_page=1
punkpeyehttps://github.com/punkpeye
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18745202917
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18745203274
https://github.com/apps/linear
linearhttps://github.com/apps/linear
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3101440061
Linearhttps://linear.app
JS-760 How to prevent handleFastifyError.handleFastifyError errors in Sentry?https://linear.app/getsentry/issue/JS-760/how-to-prevent-handlefastifyerrorhandlefastifyerror-errors-in-sentry
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18745204543
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119
https://github.com/punkpeye
punkpeyehttps://github.com/punkpeye
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3101541321
sentry-javascript/packages/node/src/integrations/tracing/fastify/index.tshttps://github.com/getsentry/sentry-javascript/blob/726c86842915111bca94d3787bc203ba05cd07e7/packages/node/src/integrations/tracing/fastify/index.ts#L86-L88
726c868https://github.com/getsentry/sentry-javascript/commit/726c86842915111bca94d3787bc203ba05cd07e7
https://github.com/punkpeye
punkpeyehttps://github.com/punkpeye
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3101573268
https://github.com/punkpeye
punkpeyehttps://github.com/punkpeye
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3101574927
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3102841144
sentry-javascript/packages/node/src/integrations/tracing/fastify/index.tshttps://github.com/getsentry/sentry-javascript/blob/549ca398f0b8cdd83b8a5e37894efd5a6a795247/packages/node/src/integrations/tracing/fastify/index.ts#L124-L127
549ca39https://github.com/getsentry/sentry-javascript/commit/549ca398f0b8cdd83b8a5e37894efd5a6a795247
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18753111760
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 22, 2025https://github.com/getsentry/sentry-javascript/issues/17119
https://github.com/kblcuk
kblcukhttps://github.com/kblcuk
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3131285338
@Lms24https://github.com/Lms24
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18873252330
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119
Lms24https://github.com/Lms24
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18875378884
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
Waiting for: Communityhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Community%22
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18876776537
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3132081697
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18876797725
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3132135318
@punkpeyehttps://github.com/punkpeye
sentry-javascript/packages/node/src/integrations/tracing/fastify/index.tshttps://github.com/getsentry/sentry-javascript/blob/e3376ee8b3cb23a4b6def34b099a92821bd40908/packages/node/src/integrations/tracing/fastify/index.ts#L124-L128
e3376eehttps://github.com/getsentry/sentry-javascript/commit/e3376ee8b3cb23a4b6def34b099a92821bd40908
Lms24https://github.com/Lms24
Waiting for: Communityhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Community%22
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18877033475
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119
https://github.com/punkpeye
punkpeyehttps://github.com/punkpeye
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#issuecomment-3132556141
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
Waiting for: Communityhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Community%22
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18878930309
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 29, 2025https://github.com/getsentry/sentry-javascript/issues/17119
Lms24https://github.com/Lms24
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 30, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18897115588
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 30, 2025https://github.com/getsentry/sentry-javascript/issues/17119#event-18897116020
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/17119
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/17119
Lms24https://github.com/Lms24
Featurehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.