Merged in feat/sentry (pull request #1089)

This commit is contained in:
Linus Flood
2024-12-19 10:35:20 +00:00
committed by Joakim Jäderberg
parent e0c5b59860
commit 3982b1ba56
32 changed files with 2715 additions and 429 deletions

View File

@@ -1,5 +1,6 @@
"use client"
import * as Sentry from "@sentry/nextjs"
import { useEffect } from "react"
export default function Error({
@@ -8,7 +9,10 @@ export default function Error({
error: Error & { digest?: string }
}) {
useEffect(() => {
console.error({ breadcrumbsError: error })
if (!error) return
console.error(error)
Sentry.captureException(error)
}, [error])
return (