Skip to content

Commit fbd39a4

Browse files
committed
fix(frontend/app): log critical errors in GlobalError component
1 parent a2c41bd commit fbd39a4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

frontend/app/global-error.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
'use client';
22

3+
import { useEffect } from 'react';
4+
35
export default function GlobalError({
46
error,
57
reset,
68
}: {
79
error: Error & { digest?: string };
810
reset: () => void;
911
}) {
12+
useEffect(() => {
13+
// Log the error to console (in production, send to error reporting service)
14+
console.error('Critical application error:', error);
15+
}, [error]);
16+
1017
return (
1118
<html lang="en">
1219
<body className="bg-gray-50 dark:bg-zinc-900">

0 commit comments

Comments
 (0)