We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35f560d commit e9820bbCopy full SHA for e9820bb
packages/nextjs/src/utils/withSentry.ts
@@ -187,6 +187,10 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
187
return boundHandler();
188
};
189
190
+ // Flag the original handler as already having been wrapped, to prevent it from being wrapped twice (which it could
191
+ // be, if someone has already wrapped it manually and then we come along and auto-wrap it)
192
+ wrappedHandler.__sentry_wrapped__ = true;
193
+
194
return wrappedHandler;
195
196
0 commit comments