File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ interface SentryTrpcMiddlewareOptions {
88interface TrpcMiddlewareArguments < T > {
99 path : string ;
1010 type : 'query' | 'mutation' | 'subscription' ;
11- next : ( ) => Promise < T > ;
11+ next : ( ) => T ;
1212 rawInput : unknown ;
1313}
1414
@@ -19,7 +19,7 @@ interface TrpcMiddlewareArguments<T> {
1919 * Next.js SDK)
2020 */
2121export async function sentryTrpcMiddleware ( options : SentryTrpcMiddlewareOptions = { } ) {
22- return async function < T > ( { path, type, next, rawInput } : TrpcMiddlewareArguments < T > ) : Promise < T > {
22+ return function < T > ( { path, type, next, rawInput } : TrpcMiddlewareArguments < T > ) : T {
2323 const hub = getCurrentHub ( ) ;
2424 const clientOptions = hub . getClient ( ) ?. getOptions ( ) ;
2525 const sentryTransaction = hub . getScope ( ) ?. getTransaction ( ) ;
@@ -39,6 +39,6 @@ export async function sentryTrpcMiddleware(options: SentryTrpcMiddlewareOptions
3939 sentryTransaction . setData ( 'trpc' , trpcData ) ;
4040 }
4141
42- return await next ( ) ;
42+ return next ( ) ;
4343 } ;
4444}
You can’t perform that action at this time.
0 commit comments