Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react-router
SDK Version
10.14.0
Framework Version
React Router 7.9.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
I'm using wrapSentryHandleRequest to wrap my handler:
async function handleRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
entryContext: EntryContext,
routerContext: RouterContextProvider,
) {
...
}
export default wrapSentryHandleRequest(handleRequest)
Expected Result
No type error
Actual Result
Type error:
Argument of type '(request: Request, responseStatusCode: number, responseHeaders: Headers, entryContext: EntryContext, routerContext: RouterContextProvider) => Promise<...>' is not assignable to parameter of type 'OriginalHandleRequest'.
Types of parameters 'routerContext' and 'loadContext' are incompatible.
Type 'AppLoadContext' is missing the following properties from type 'RouterContextProvider': #private, get, setts(2345)
Additional Context
When the v8_middleware future flag is enabled, RouterContextProvider should be used instead of AppLoadContext
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.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react-router
SDK Version
10.14.0
Framework Version
React Router 7.9.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
I'm using
wrapSentryHandleRequestto wrap my handler:Expected Result
No type error
Actual Result
Type error:
Additional Context
When the
v8_middlewarefuture flag is enabled,RouterContextProvidershould be used instead ofAppLoadContextTip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.