mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Convert global-error to TypeScript
This commit is contained in:
parent
909afc1edf
commit
f9bfe51f42
@ -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>
|
||||
);
|
||||
@ -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 } });
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user