canina/frontend/application/app/error.tsx

18 lines
383 B
TypeScript

"use client";
import React, { useEffect } from "react";
import { ServerErrorPage } from "../components/ErrorPages";
export default function ErrorBoundary({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error("Global Application Error:", error);
}, [error]);
return <ServerErrorPage onRetry={reset} />;
}