Title: SvelteKit redirects thrown in instrumented request handlers should not trigger captureException · Issue #8214 · getsentry/sentry-javascript · GitHub
Open Graph Title: SvelteKit redirects thrown in instrumented request handlers should not trigger captureException · Issue #8214 · getsentry/sentry-javascript
X Title: SvelteKit redirects thrown in instrumented request handlers should not trigger captureException · Issue #8214 · getsentry/sentry-javascript
Description: The incorrect behaviour seems to be present in @sentry/sveltekit@7.52.1 - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks handle() function are being reported to...
Open Graph Description: The incorrect behaviour seems to be present in @sentry/sveltekit@7.52.1 - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks...
X Description: The incorrect behaviour seems to be present in @sentry/sveltekit@7.52.1 - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8214
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" SvelteKit redirects thrown in instrumented request handlers should not trigger captureException","articleBody":"The incorrect behaviour seems to be present in `@sentry/sveltekit@7.52.1` - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks `handle()` function are being reported to Sentry as errors. Or rather, we see the following error since a SvelteKit redirect is not an instance of class `Error`:\r\n\r\n```\r\nObject.captureException\r\n💀 Unhandled Non-Error exception captured with keys: location, status\r\n```\r\n\r\nA minimal reproduction would be something like this:\r\n\r\n```\r\n// hooks.server.ts\r\nexport const handle = async ({ event, resolve }) => {\r\n // dummy logic to handle users who aren't logged in\r\n if (event.url.pathname !== '/login') {\r\n throw redirect(303, '/login');\r\n }\r\n\r\n const response = await resolve(event);\r\n return response;\r\n};\r\n```\r\n\r\n_Originally posted by @abirtley in https://github.com/getsentry/sentry-javascript/issues/7719#issuecomment-1562210969_\r\n ","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2023-05-25T12:36:07Z","url":"https://github.com/getsentry/sentry-javascript/issues/8214"}
| 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:435f78fa-10d9-a23f-0377-f35cd1af70fd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9036:70606:2AB262:3AE894:6B044C35 |
| html-safe-nonce | 777fe590c0b6ef52a7d8b85c619ad878ebe1d4ef22fdb7325a162903c4510bb7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDM2OjcwNjA2OjJBQjI2MjozQUU4OTQ6NkIwNDRDMzUiLCJ2aXNpdG9yX2lkIjoiNjYxMDk1OTA2NTYyMTQ4MjU0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2119ead1f7afe21fb3c43f1d0930628be3f7c553c23e99d98376bd92b220ccf0 |
| hovercard-subject-tag | issue:1725740445 |
| 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/8214/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4cb801d2ae8559a88c49a7ef39c21a03726bde984db064bc3a935c6daae76d42/getsentry/sentry-javascript/issues/8214 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4cb801d2ae8559a88c49a7ef39c21a03726bde984db064bc3a935c6daae76d42/getsentry/sentry-javascript/issues/8214 |
| og:image:alt | The incorrect behaviour seems to be present in @sentry/sveltekit@7.52.1 - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lms24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| 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