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 517f73e commit 4702da7Copy full SHA for 4702da7
packages/nextjs/src/utils/withSentry.ts
@@ -157,7 +157,9 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
157
}
158
});
159
160
- return await boundHandler();
+ // Since API route handlers are all async, nextjs always awaits the return value (meaning it's fine for us to return
161
+ // a promise here rather than a real result, and it saves us the overhead of an `await` call.)
162
+ return boundHandler();
163
};
164
165
0 commit comments