Files
web/app/global-error.tsx
2024-12-19 10:35:20 +00:00

29 lines
512 B
TypeScript

"use client"
import * as Sentry from "@sentry/nextjs"
import { useEffect } from "react"
import styles from "./global-error.module.css"
export default function GlobalError({
error,
}: {
error: Error & { digest?: string }
}) {
console.log({ global_error: error })
useEffect(() => {
Sentry.captureException(error)
}, [error])
return (
<html>
<body>
<div className={styles.layout}>
<h1>Something went really wrong!</h1>
</div>
</body>
</html>
)
}