René's URL Explorer Experiment


Title: Inaccurate Error reporting in Cloudflare Workers · Issue #17588 · getsentry/sentry-javascript · GitHub

Open Graph Title: Inaccurate Error reporting in Cloudflare Workers · Issue #17588 · getsentry/sentry-javascript

X Title: Inaccurate Error reporting in Cloudflare Workers · Issue #17588 · getsentry/sentry-javascript

Description: Environment Using Nuxt and Cloudflare Workers (not sure if it's at the Nuxt, Nitro or V8 level). Steps to Reproduce I set up a repo with the latest versions of Nuxt, Wrangler and Sentry SDK to easily reproduce. main branch shows how erro...

Open Graph Description: Environment Using Nuxt and Cloudflare Workers (not sure if it's at the Nuxt, Nitro or V8 level). Steps to Reproduce I set up a repo with the latest versions of Nuxt, Wrangler and Sentry SDK to easi...

X Description: Environment Using Nuxt and Cloudflare Workers (not sure if it's at the Nuxt, Nitro or V8 level). Steps to Reproduce I set up a repo with the latest versions of Nuxt, Wrangler and Sentry SDK to ...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inaccurate Error reporting in Cloudflare Workers","articleBody":"### Environment\nUsing Nuxt and Cloudflare Workers (not sure if it's at the Nuxt, Nitro or V8 level).\n\n### Steps to Reproduce\nI set up a repo with the latest versions of Nuxt, Wrangler and Sentry SDK to easily reproduce.\n\n* [main branch](https://github.com/Buzut/sentry-nuxt-v4/tree/main) shows how error are reported in Worker environment\n* [baseline branch](https://github.com/Buzut/sentry-nuxt-v4/tree/baseline) shows the basic node setup with proper error reporting and stack traces\n\nI'm not sure about the Cloudflare specific configuration as [the docs](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/nuxt/) mention the old Cloudflare Pages product, not Workers.\n\nFor that reason, I left in the repo both the `/server/plugins/sentry-cloudflare-plugin.ts` and `sentry.server.config.ts` although it is mentioned to have either one at a time (easy to delete for testing).\n\nIt's also worth mentioning that I tried both normal and the limited (`top-level-import`) methods.\n\n### Expected Result\n\n# Error: Nuxt Server Error 4\n\n**Issue ID:** 6869389825\n**Project:** sentry-test\n**Date:** 10/09/2025, 15:13:58\n\n## Tags\n\n- **browser:** Chrome 138.0.0\n- **browser.name:** Chrome\n- **client_os:** macOS\n- **client_os.name:** macOS\n- **environment:** production\n- **handled:** no\n- **level:** error\n- **mechanism:** generic\n- **os:** macOS 14.7.6\n- **os.name:** macOS\n- **release:** 3bffb684f168a67f1d50a894681f4020087b9779\n- **runtime:** node v24.4.1\n- **runtime.name:** node\n- **server_name:** MacBook-Air.local\n- **transaction:** GET /api/error\n- **url:** http://localhost:3000/api/error\n\n## Exception\n\n### Exception 1\n**Type:** Error\n**Value:** Nuxt Server Error\n\n#### Stacktrace\n\n```\n createError$1 in /Users/buzut/Downloads/sentry-nuxt/.output/server/chunks/nitro/nitro.mjs [Line 978] (In app)\n    return obj;\n  }\n}\nfunction createError$1(input) {\n  if (typeof input === \"string\") {\n    return new H3Error(input);  \u003c-- SUSPECT LINE\n  }\n  if (isError(input)) {\n    return input;\n  }\n  const err = new H3Error(input.message ?? input.statusMessage ?? \"\", {\n error in ./server/api/error.js [Line 2] (In app)\nexport default eventHandler((event) => {\n  throw createError('Nuxt Server Error');  \u003c-- SUSPECT LINE\n});\n Unknown function in /Users/buzut/Downloads/sentry-nuxt/.output/server/chunks/nitro/nitro.mjs [Line 1852] (In app)\n  };\n  const handler = eventHandler((event) => {\n    if (_resolved) {\n      return _resolved.handler(event);\n    }\n    return resolveHandler().then((r) => r.handler(event));  \u003c-- SUSPECT LINE\n  });\n  handler.__resolve__ = resolveHandler;\n  return handler;\n}\nconst lazyEventHandler = defineLazyEventHandler;\n Object.? in /Users/buzut/Downloads/sentry-nuxt/.output/server/chunks/nitro/nitro.mjs [Line 1921] (In app)\n      if (layer.match && !layer.match(_layerPath, event)) {\n        continue;\n      }\n      event._path = _layerPath;\n      event.node.req.url = _layerPath;\n      const val = await layer.handler(event);  \u003c-- SUSPECT LINE\n      const _body = val === void 0 ? void 0 : await val;\n      if (_body !== void 0) {\n        const _response = { body: _body };\n        if (options.onBeforeResponse) {\n          event._onBeforeResponseCalled = true;\n Unknown function in /Users/buzut/Downloads/sentry-nuxt/.output/server/chunks/nitro/nitro.mjs [Line 4544] (In app)\n      debug$1.log(\n        `Patched h3 event handler. ${isolationScope === newIsolationScope ? \"Using existing\" : \"Created new\"} isolation scope.`\n      );\n      return withIsolationScope(newIsolationScope, async () => {\n        try {\n          return await handlerTarget.apply(handlerThisArg, handlerArgs);  \u003c-- SUSPECT LINE\n        } finally {\n          await flushIfServerless();\n        }\n      });\n    }\n Server.toNodeHandle in /Users/buzut/Downloads/sentry-nuxt/.output/server/chunks/nitro/nitro.mjs [Line 2192] (In app)\n}\nfunction toNodeListener(app) {\n  const toNodeHandle = async function(req, res) {\n    const event = createEvent(req, res);\n    try {\n      await app.handler(event);  \u003c-- SUSPECT LINE\n    } catch (_error) {\n      const error = createError$1(_error);\n      if (!isError(_error)) {\n        error.unhandled = true;\n      }\n```\n\n\nWhat you thought would happen.\n\n### Actual Result\n\n# FetchError: [GET] \"/api/error\": 500 Server Error\n\n**Issue ID:** 6869165189\n**Project:** sentry-test\n**Date:** 10/09/2025, 15:33:04\n\n## Tags\n\n- **browser:** Chrome 138.0.0\n- **browser.name:** Chrome\n- **device:** Mac\n- **device.family:** Mac\n- **environment:** production\n- **handled:** no\n- **level:** error\n- **mechanism:** auto.browser.global_handlers.onunhandledrejection\n- **os:** Mac OS X >=10.15.7\n- **os.name:** Mac OS X\n- **release:** 3bffb684f168a67f1d50a894681f4020087b9779\n- **transaction:** /\n- **url:** http://localhost:8787/\n\n## Exception\n\n### Exception 1\n**Type:** FetchError\n**Value:** [GET] \"/api/error\": 500 Server Error\n\n#### Stacktrace\n\n```\n $fetchRaw in ./node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs [Line 311] (Not in app)\n        await callHooks(\n          context,\n          context.options.onResponseError\n        );\n      }\n      return await onError(context);  \u003c-- SUSPECT LINE\n    }\n    return context.response;\n  };\n  const $fetch = async function $fetch2(request, options) {\n    const r = await $fetchRaw(request, options);\n $fetch in ./node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs [Line 316] (Not in app)\n      return await onError(context);\n    }\n    return context.response;\n  };\n  const $fetch = async function $fetch2(request, options) {\n    const r = await $fetchRaw(request, options);  \u003c-- SUSPECT LINE\n    return r._data;\n  };\n  $fetch.raw = $fetchRaw;\n  $fetch.native = (...args) => fetch(...args);\n  $fetch.create = (defaultOptions = {}, customGlobalOptions = {}) => createFetch({\n```\n\n\nNote that the behaviour is the same if using the local WorkerD server or a real deployment on Cloudflare servers.\n","author":{"url":"https://github.com/Buzut","@type":"Person","name":"Buzut"},"datePublished":"2025-09-10T13:55:25Z","url":"https://github.com/getsentry/sentry-javascript/issues/17588"}

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:4e913844-4ff3-6f0f-8b60-f3cdd3d819d7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idACD6:C51C8:1724560:1F16850:6B053C07
html-safe-noncec61dcb7de1630c4a40f84c7ffaf60e2643944a62bc0e27e037fa01c96e4ac5ad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0Q2OkM1MUM4OjE3MjQ1NjA6MUYxNjg1MDo2QjA1M0MwNyIsInZpc2l0b3JfaWQiOiI4Nzk5NDQyNzMzNDIyMTY0OTk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac137c82c646c9828c7dbde81977815baf6d73020eb0685508c5cecaa6872e9f71
hovercard-subject-tagissue:3402632641
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/17588/issue_layout
twitter:imagehttps://opengraph.githubassets.com/75ae99ac8bf0677d71dc21459dabe9d4ff4de4ff965f2042f49f70b190f66974/getsentry/sentry-javascript/issues/17588
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/75ae99ac8bf0677d71dc21459dabe9d4ff4de4ff965f2042f49f70b190f66974/getsentry/sentry-javascript/issues/17588
og:image:altEnvironment Using Nuxt and Cloudflare Workers (not sure if it's at the Nuxt, Nitro or V8 level). Steps to Reproduce I set up a repo with the latest versions of Nuxt, Wrangler and Sentry SDK to easi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBuzut
hostnamegithub.com
expected-hostnamegithub.com
None854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b
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
release220e980097d94ce616d5d11fbd5316d208e3fc93
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/17588#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F17588
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%2F17588
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/17588
Reloadhttps://github.com/getsentry/sentry-javascript/issues/17588
Reloadhttps://github.com/getsentry/sentry-javascript/issues/17588
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues333 (333)https://github.com/getsentry/sentry-javascript/issues
Pull requests52 (52)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/17588
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/17588
#17596https://github.com/getsentry/sentry-javascript/pull/17596
Inaccurate Error reporting in Cloudflare Workershttps://github.com/getsentry/sentry-javascript/issues/17588#top
#17596https://github.com/getsentry/sentry-javascript/pull/17596
https://github.com/s1gr1d
https://github.com/Buzut
Buzuthttps://github.com/Buzut
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issue-3402632641
main branchhttps://github.com/Buzut/sentry-nuxt-v4/tree/main
baseline branchhttps://github.com/Buzut/sentry-nuxt-v4/tree/baseline
the docshttps://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/nuxt/
http://localhost:3000/api/errorhttp://localhost:3000/api/error
http://localhost:8787/http://localhost:8787/
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 Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19614087209
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19614087247
https://github.com/apps/linear
linearhttps://github.com/apps/linear
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3275136320
Linearhttps://linear.app
WIZARD-100 Inaccurate Error reporting in Cloudflare Workershttps://linear.app/getsentry/issue/WIZARD-100/inaccurate-error-reporting-in-cloudflare-workers
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588
s1gr1dhttps://github.com/s1gr1d
getsentry/sentry-wizardhttps://github.com/getsentry/sentry-wizard
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19614087432
https://github.com/apps/linear
linearhttps://github.com/apps/linear
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3275136874
Linearhttps://linear.app
JS-922 Inaccurate Error reporting in Cloudflare Workershttps://linear.app/getsentry/issue/JS-922/inaccurate-error-reporting-in-cloudflare-workers
https://github.com/s1gr1d
s1gr1dhttps://github.com/s1gr1d
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3275165204
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 Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19614232642
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588
s1gr1dhttps://github.com/s1gr1d
on Sep 10, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19614233087
s1gr1dhttps://github.com/s1gr1d
on Sep 11, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19633237268
fix(nitro): Support nested `_platform` properties in Nitro 2.11.7+ (#…https://github.com/getsentry/sentry-javascript/commit/fefb37d84edea9f6bcd34111ed5442315b3a14d3
#…https://github.com/getsentry/sentry-javascript/pull/17596
fefb37dhttps://github.com/getsentry/sentry-javascript/commit/fefb37d84edea9f6bcd34111ed5442315b3a14d3
s1gr1dhttps://github.com/s1gr1d
Package: nuxthttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20nuxt%22
on Sep 11, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19637819363
https://github.com/s1gr1d
s1gr1dhttps://github.com/s1gr1d
on Sep 11, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3280877143
#17596https://github.com/getsentry/sentry-javascript/pull/17596
s1gr1dhttps://github.com/s1gr1d
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 11, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19638216278
https://github.com/Buzut
Buzuthttps://github.com/Buzut
on Sep 11, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3281243147
#17596https://github.com/getsentry/sentry-javascript/pull/17596
s1gr1dhttps://github.com/s1gr1d
on Sep 12, 2025https://github.com/getsentry/sentry-javascript/issues/17588#event-19654348245
docs(nuxt): Update docs for Cloudflare Workers (#14889)https://github.com/getsentry/sentry-docs/commit/391f9f512bf4d5b43cddd6378bd13cc2ab274fae
#14889https://github.com/getsentry/sentry-docs/pull/14889
391f9f5https://github.com/getsentry/sentry-docs/commit/391f9f512bf4d5b43cddd6378bd13cc2ab274fae
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 16, 2025https://github.com/getsentry/sentry-javascript/issues/17588#issuecomment-3299191774
GitHub Actionshttps://help.github.com/en/actions
#17596https://github.com/getsentry/sentry-javascript/pull/17596
10.12.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/10.12.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/17588
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/17588
s1gr1dhttps://github.com/s1gr1d
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.