Skip to content

Commit 62de860

Browse files
committed
even more checks...
1 parent 6a906a2 commit 62de860

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ test.only('Should create a transaction for route handlers', async ({ request })
66
console.log('transactionEvent', JSON.stringify(transactionEvent, null, 2));
77
return (
88
transactionEvent.transaction === 'GET /route-handlers/[param]' &&
9-
transactionEvent.contexts?.trace?.data?.WIP_TEST === 'yes'
9+
transactionEvent.contexts?.trace?.data?.WIP_TEST === 'yes' &&
10+
!!transactionEvent.request
1011
);
1112
});
1213

packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ function wrapHandler<T>(handler: T, method: 'GET' | 'POST' | 'PUT' | 'PATCH' | '
3636
/** empty */
3737
}
3838

39+
console.log('WRAP ROUTE HANDLER WITH SENTRY');
40+
3941
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
4042
return Sentry.wrapRouteHandlerWithSentry(originalFunction as any, {
4143
method,

0 commit comments

Comments
 (0)