Title: Errors not properly reported when streaming data fails in Sveltekit on Cloudflare · Issue #17009 · getsentry/sentry-javascript · GitHub
Open Graph Title: Errors not properly reported when streaming data fails in Sveltekit on Cloudflare · Issue #17009 · getsentry/sentry-javascript
X Title: Errors not properly reported when streaming data fails in Sveltekit on Cloudflare · Issue #17009 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17009
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Errors not properly reported when streaming data fails in Sveltekit on Cloudflare","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/browser\n\n### SDK Version\n\n9.38.0\n\n### Framework Version\n\nSveltekit 2.17.1\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nhttps://github.com/RaniSputnik/sentry-issues/tree/streamed-data-error\n\nI've followed the [documented instructions](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/sveltekit/) for setting up Sveltekit and Sentry on Cloudflare. I've created a page in the app that [streams data to the client](https://svelte.dev/docs/kit/load#Streaming-with-promises). The streamed data is set up to always fail:\n\n```ts\nexport const load: PageServerLoad = async () => {\n const streamedData = new Promise((resolve, reject) => \n setTimeout(() => reject(new Error('Slow data error')), 2000))\n return { streamedData }\n}\n```\n\nOn the client, I have a page that awaits the data but doesn't catch failures:\n```svelte\n{#await data.streamedData}\n\t\u003cp>Loading...\u003c/p>\n{:then streamedData}\n\t\u003cp>Finished loading successfully: {JSON.stringify(streamedData)}\u003c/p>\n{/await}\n````\n\n### Steps to Reproduce\n\n1. Clone the linked reproduction above\n2. Deploy to Cloudflare workers\n3. Visit the /streaming-error page\n\n### Expected Result\n\nWhen run locally an issue is reported from the server with details of the error:\n\n\u003cimg width=\"482\" height=\"187\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c8f1a28f-27bd-4aba-a3e9-bf6e23d9bbdf\" />\n\n### Actual Result\n\nWhen run in Cloudflare there is no server-side error, just this `\u003cunknown>` error from the client:\n\n\u003cimg width=\"493\" height=\"178\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6eb463d6-9d38-453d-aa0a-b604911410c8\" />\n\nI think the server error should have been reported as that would be consistent with the behavior I see locally. If I were to catch the rejected promise on the client, then the unhandled error won't be captured by Sentry at all. I don't love the `\u003cunknown>` error on the client but I think that's outside the scope of this issue. I think the bigger problem here is the lack of capture on the server.","author":{"url":"https://github.com/RaniSputnik","@type":"Person","name":"RaniSputnik"},"datePublished":"2025-07-15T07:21:14Z","url":"https://github.com/getsentry/sentry-javascript/issues/17009"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3c13b700-7f2a-286a-03b8-430bbe646b5c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADFC:912DC:63037:856CB:6B05D39F |
| html-safe-nonce | af8358eab691f209f2c8b41c8aa5a06485f640d3864f2c883046e90660cca88e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREZDOjkxMkRDOjYzMDM3Ojg1NkNCOjZCMDVEMzlGIiwidmlzaXRvcl9pZCI6IjEwNjM1NTM5ODI5ODA4MDU1MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 07909a892291aa1b838ed82ab15beedbec9201e0d2e47027e11a0709262e46cc |
| hovercard-subject-tag | issue:3231118933 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/17009/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80a963b9b309b1bda0c46477209a9bd2beb16d2aceaaee37711bf4f70d9824e0/getsentry/sentry-javascript/issues/17009 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80a963b9b309b1bda0c46477209a9bd2beb16d2aceaaee37711bf4f70d9824e0/getsentry/sentry-javascript/issues/17009 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RaniSputnik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7cc8361bc0396e5c33704280422dd7a38c5b91f6190589faea57461f56967249 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab4da203740f827015a12d36851c8de196e908bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width