File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/nextjs/src/utils Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type WrappedNextApiHandler = NextApiHandler;
1313type AugmentedResponse = NextApiResponse & { __sentryTransaction ?: Transaction } ;
1414
1515// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
16- export const withSentry = ( handler : NextApiHandler ) : WrappedNextApiHandler => {
16+ export const withSentry = ( origHandler : NextApiHandler ) : WrappedNextApiHandler => {
1717 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1818 return async ( req , res ) => {
1919 // first order of business: monkeypatch `res.end()` so that it will wait for us to send events to sentry before it
@@ -74,7 +74,7 @@ export const withSentry = (handler: NextApiHandler): WrappedNextApiHandler => {
7474 }
7575
7676 try {
77- return await handler ( req , res ) ; // Call original handler
77+ return await origHandler ( req , res ) ;
7878 } catch ( e ) {
7979 if ( currentScope ) {
8080 currentScope . addEventProcessor ( event => {
You can’t perform that action at this time.
0 commit comments