Files
web/apps/scandic-web/app/global-error.tsx
Linus Flood 7563db9dbc Merged in fix/intl-global-error (pull request #1510)
Fix: Error message when copy fail. Null check on localstorage. Removed Intl from global-error.tsx

* Error message if failed to copy

* Use try/catch instead


Approved-by: Joakim Jäderberg
2025-03-11 10:49:56 +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>
)
}