Convert global-error to TypeScript

This commit is contained in:
Stan Wohlwend 2024-04-14 13:45:02 +02:00
parent 909afc1edf
commit f9bfe51f42
2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import * as Sentry from "@sentry/nextjs";
import Error from "next/error";
import { useEffect } from "react";
export default function GlobalError({ error }) {
export default function GlobalError({ error }: any) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
@ -12,7 +12,9 @@ export default function GlobalError({ error }) {
return (
<html>
<body>
<Error />
<Error
statusCode={500}
/>
</body>
</html>
);

View File

@ -2,7 +2,6 @@ import { registerErrorSink } from "@stackframe/stack-shared/dist/utils/errors";
import * as Sentry from "@sentry/nextjs";
const sentryErrorSink = (location: string, error: unknown) => {
console.log("YAAAA");
Sentry.captureException(error, { extra: { location } });
};