Title: wrapSentryHandleRequest type mismatch with React Router middleware · Issue #17749 · getsentry/sentry-javascript · GitHub
Open Graph Title: wrapSentryHandleRequest type mismatch with React Router middleware · Issue #17749 · getsentry/sentry-javascript
X Title: wrapSentryHandleRequest type mismatch with React Router middleware · Issue #17749 · 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/17749
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"wrapSentryHandleRequest type mismatch with React Router middleware","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/react-router\n\n### SDK Version\n\n10.14.0\n\n### Framework Version\n\nReact Router 7.9.1\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\nI'm using `wrapSentryHandleRequest` to wrap my handler:\n\n```\nasync function handleRequest(\n request: Request,\n responseStatusCode: number,\n responseHeaders: Headers,\n entryContext: EntryContext,\n routerContext: RouterContextProvider,\n) {\n ...\n}\n\nexport default wrapSentryHandleRequest(handleRequest)\n```\n\n\n### Expected Result\n\nNo type error\n\n### Actual Result\n\nType error:\n\n```\nArgument of type '(request: Request, responseStatusCode: number, responseHeaders: Headers, entryContext: EntryContext, routerContext: RouterContextProvider) => Promise\u003c...>' is not assignable to parameter of type 'OriginalHandleRequest'.\n Types of parameters 'routerContext' and 'loadContext' are incompatible.\n Type 'AppLoadContext' is missing the following properties from type 'RouterContextProvider': #private, get, setts(2345)\n```\n\n### Additional Context\n\nWhen the `v8_middleware` future flag is enabled, `RouterContextProvider` should be used instead of `AppLoadContext`\n\n\u003csub>Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/wong2","@type":"Person","name":"wong2"},"datePublished":"2025-09-24T08:46:57Z","url":"https://github.com/getsentry/sentry-javascript/issues/17749"}
| 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:273756f4-72d8-02ae-163d-0327c79a507c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DABE:345F7:AB103:DE8E2:6B04E94D |
| html-safe-nonce | 7f3a50d30ab46b212e6b71f62e618e19d30e54b7d06c5c2f1b4da0d3c68b9ecb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUJFOjM0NUY3OkFCMTAzOkRFOEUyOjZCMDRFOTREIiwidmlzaXRvcl9pZCI6IjIzODI3NDg2NDM4NzE3NDYzODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c4f7e176db02edb3eea71cbdfad7e61eae18406bde09c3f51a3580bee86bd77f |
| hovercard-subject-tag | issue:3448392239 |
| 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/17749/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4d993ee4e74c22941760f8ccd71adcd8b4bf751b1eb868e68a5f2631bd2af261/getsentry/sentry-javascript/issues/17749 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4d993ee4e74c22941760f8ccd71adcd8b4bf751b1eb868e68a5f2631bd2af261/getsentry/sentry-javascript/issues/17749 |
| 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 | wong2 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32 |
| 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 | e29c922455fd8137f27e1cfcdf6a1e8b920b1926 |
| ui-target | canary-1 |
| 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