From 8247ebf118b399528487dc807f9e6d356aea0983 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Wed, 13 Mar 2024 22:01:30 +0300 Subject: [PATCH] Try to stringify router error object --- src/frontend/src/pages/ui/ErrorPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/pages/ui/ErrorPage.tsx b/src/frontend/src/pages/ui/ErrorPage.tsx index 717a26ba8..a79a7b6c3 100644 --- a/src/frontend/src/pages/ui/ErrorPage.tsx +++ b/src/frontend/src/pages/ui/ErrorPage.tsx @@ -4,11 +4,11 @@ import { Link as RouterLink, useRouteError } from 'react-router-dom'; import { ErrorLayout } from '@/widgets/layout'; export const ErrorPage: FC = () => { - const error = useRouteError() as Error; + const error = useRouteError(); useEffect(() => { // eslint-disable-next-line no-console - console.error(error); + console.error(JSON.stringify(error)); }, [error]); return ( @@ -19,7 +19,7 @@ export const ErrorPage: FC = () => { Sorry, the page you are looking for does not exist, or an unexpected error has occurred - {error.message && Error message: {error.message}} + {/* {error.message && Error message: {error.message}} */} Return to home