diff --git a/public/locales/en.json b/public/locales/en.json index 168c83cb..f55df2a8 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -380,6 +380,7 @@ "invalid_action": "This is not a valid action", "invalid_file_type": "Invalid filetype", "invalid_input": "Invalid input", + "unrecoverable_error": "Something went wrong\nAn error occurred that we cannot recover from", "update_failed": "Could not check for updates" } }, diff --git a/src/modules/core/components/ErrorBoundary.tsx b/src/modules/core/components/ErrorBoundary.tsx index f5fa23c9..3a07205e 100644 --- a/src/modules/core/components/ErrorBoundary.tsx +++ b/src/modules/core/components/ErrorBoundary.tsx @@ -8,7 +8,9 @@ import { Component, ErrorInfo, ReactNode, useEffect, useRef, useState } from 'react'; import { useLocation } from 'react-router-dom'; +import { t } from 'i18next'; import { getErrorMessage } from '@/lib/HelperFunctions.ts'; +import { EmptyView } from '@/modules/core/components/placeholder/EmptyView.tsx'; interface Props { children?: ReactNode; @@ -54,10 +56,11 @@ class RealErrorBoundary extends Component { if (error) { return ( - <> -

Something went wrong.

-

{getErrorMessage(error)}

- + window.location.reload()} + /> ); } diff --git a/src/modules/core/components/placeholder/EmptyView.tsx b/src/modules/core/components/placeholder/EmptyView.tsx index 827e414a..3ba364ad 100644 --- a/src/modules/core/components/placeholder/EmptyView.tsx +++ b/src/modules/core/components/placeholder/EmptyView.tsx @@ -68,7 +68,11 @@ const ExtraMessage = ({ messageExtra }: Pick) => if (!isGraphqlException) { return ( - + {messageExtra} ); @@ -98,6 +102,7 @@ const ExtraMessage = ({ messageExtra }: Pick) => {graphqlStackTrace}