We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7546d08 commit ae747faCopy full SHA for ae747fa
1 file changed
instrumentation.ts
@@ -1,4 +1,3 @@
1
-import * as Sentry from "@sentry/nextjs";
2
export async function register() {
3
if (process.env.NEXT_RUNTIME === "nodejs") {
4
await import("./sentry.server.config");
@@ -8,4 +7,8 @@ export async function register() {
8
7
}
9
10
// Capture errors from Server Components, middleware, and proxies
11
-export const onRequestError = Sentry.captureRequestError;
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export async function onRequestError(e: unknown, r: any, ec: any) {
12
+ const { captureRequestError } = await import("@sentry/nextjs");
13
+ captureRequestError(e, r, ec);
14
+}
0 commit comments