Skip to content

Commit 372af79

Browse files
committed
in global error, check for a translation tool
1 parent 93e9f46 commit 372af79

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

next/app/global-error.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import { Button } from "@/components/ui/button";
4+
import { translationToolDetected } from "@/state";
45
import { useEffect } from "react";
56

67
export default function GlobalError({ error }: { error: Error }) {
@@ -9,7 +10,13 @@ export default function GlobalError({ error }: { error: Error }) {
910
let reportPromise: Promise<string | void> = Promise.resolve();
1011
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
1112
reportPromise = import("@sentry/nextjs").then(
12-
({ captureException }) => captureException(error),
13+
({ captureException }) =>
14+
captureException(error, {
15+
extra: {
16+
translation_tool:
17+
translationToolDetected.nonReactGet(),
18+
},
19+
}),
1320
);
1421
}
1522

0 commit comments

Comments
 (0)