Skip to content

Commit 4b8f309

Browse files
author
Luca Forstner
committed
.
1 parent aaa8206 commit 4b8f309

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ declare const __VERCEL_CRONS_CONFIGURATION__: VercelCronsConfig;
5959

6060
let wrappedHandler = userProvidedHandler;
6161

62+
if (wrappedHandler) {
63+
wrappedHandler = Sentry.wrapApiHandlerWithSentry(wrappedHandler, '__ROUTE__');
64+
}
65+
6266
if (wrappedHandler && __VERCEL_CRONS_CONFIGURATION__) {
6367
wrappedHandler = Sentry.wrapApiHandlerWithSentryVercelCrons(wrappedHandler, __VERCEL_CRONS_CONFIGURATION__);
6468
}

0 commit comments

Comments
 (0)