File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/nextjs/src/common Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ import {
1212 SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
1313 setCapturedScopesOnSpan ,
1414 setHttpStatus ,
15+ vercelWaitUntil ,
1516 winterCGHeadersToDict ,
1617 withIsolationScope ,
1718 withScope ,
1819} from '@sentry/core' ;
1920import { isNotFoundNavigationError , isRedirectNavigationError } from './nextNavigationErrorUtils' ;
2021import type { RouteHandlerContext } from './types' ;
22+ import { flushSafelyWithTimeout } from './utils/responseEnd' ;
2123import { commonObjectToIsolationScope } from './utils/tracingUtils' ;
2224
2325/**
@@ -92,6 +94,9 @@ export function wrapRouteHandlerWithSentry<F extends (...args: any[]) => any>(
9294 } ) ;
9395 }
9496 } ,
97+ ( ) => {
98+ vercelWaitUntil ( flushSafelyWithTimeout ( ) ) ;
99+ } ,
95100 ) ;
96101
97102 try {
You can’t perform that action at this time.
0 commit comments