import { Button } from './core/Button'; import { FormattedError } from './core/FormattedError'; import { Heading } from './core/Heading'; import { VStack } from './core/Stacks'; export default function RouteError({ error }: { error: unknown; reset: () => void }) { console.log('Error', error); const stringified = JSON.stringify(error); // eslint-disable-next-line @typescript-eslint/no-explicit-any const message = (error as any).message ?? stringified; const stack = typeof error === 'object' && error != null && 'stack' in error ? String(error.stack) : null; return (
Route Error 🔥 {message} {stack && (
Stack Trace
{stack}
)}
); }