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 d5b4b4e commit 7b1c5a2Copy full SHA for 7b1c5a2
packages/nextjs/src/utils/withSentry.ts
@@ -107,7 +107,9 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
107
}
108
});
109
110
- return await boundHandler();
+ // Since API route handlers are all async, nextjs always awaits the return value (meaning it's fine for us to return
111
+ // a promise here rather than a real result, and it saves us the overhead of an `await` call.)
112
+ return boundHandler();
113
};
114
115
0 commit comments