feat: improve error handling
This commit is contained in:
@@ -13,7 +13,9 @@ export default function Error({
|
||||
|
||||
return (
|
||||
<p>
|
||||
<strong>Breadcrumbs failed for this page ({error.digest})</strong>
|
||||
<strong>
|
||||
Breadcrumbs failed for this page ({error.digest}@{Date.now()})
|
||||
</strong>
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
21
app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx
Normal file
21
app/[lang]/(live)/(protected)/my-pages/[...path]/error.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect } from "react"
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
}: {
|
||||
error: Error & { digest?: string }
|
||||
}) {
|
||||
useEffect(() => {
|
||||
console.error({ breadcrumbsError: error })
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<p>
|
||||
<strong>
|
||||
Error loading this page ({error.digest}@{Date.now()})
|
||||
</strong>
|
||||
</p>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user