We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b673c21 commit ac0474cCopy full SHA for ac0474c
instrumentation.ts
@@ -1,3 +1,4 @@
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");
@@ -7,8 +8,4 @@ export async function register() {
7
8
}
9
10
// Capture errors from Server Components, middleware, and proxies
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
11
-export async function onRequestError(e: unknown, r: any, ec: any) {
12
- const { captureRequestError } = await import("@sentry/nextjs");
13
- captureRequestError(e, r, ec);
14
-}
+export const onRequestError = Sentry.captureRequestError;
0 commit comments