stack/apps/backend/src/app/global-error.tsx
2024-07-14 10:37:34 -07:00

22 lines
397 B
TypeScript

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