8000 [real but missing comment] use setImmediate for transaction.finish in… · sdemjanenko/sentry-javascript@8b8a0fe · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b8a0fe

Browse files
committed
[real but missing comment] use setImmediate for transaction.finish in withSentry
1 parent 3c51352 commit 8b8a0fe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/nextjs/src/utils/handlers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ export const withSentry = (handler: NextApiHandler): WrappedNextApiHandler => {
7878
// `addRequestDataToEvent`
7979
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
8080
delete transaction.metadata.requestPath;
81-
82-
transaction.finish();
81+
setImmediate(() => transaction.finish());
8382
}
8483
try {
8584
await flush(2000);

0 commit comments

Comments
 (0)
0