Skip to content

Commit d341330

Browse files
committed
fix withSentry mechanism
1 parent d5e9165 commit d341330

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/nextjs/src/utils/withSentry.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
7979
if (currentScope) {
8080
currentScope.addEventProcessor(event => {
8181
addExceptionMechanism(event, {
82-
mechanism: 'withSentry',
83-
handled: false,
82+
type: 'instrument',
83+
handled: true,
84+
data: {
85+
wrapped_handler: origHandler.name,
86+
function: 'withSentry',
87+
},
8488
});
8589
return event;
8690
});

0 commit comments

Comments
 (0)