Use "getErrorMessage" everywhere

This commit is contained in:
schroda
2024-12-21 23:27:03 +01:00
parent a4f1aa3234
commit 9e93a78a07
29 changed files with 45 additions and 32 deletions

View File

@@ -8,6 +8,7 @@
import { Component, ErrorInfo, ReactNode, useEffect, useRef, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
interface Props {
children?: ReactNode;
@@ -55,7 +56,7 @@ class RealErrorBoundary extends Component<Props, State> {
return (
<>
<h1>Something went wrong.</h1>
<p>{error.message ?? JSON.stringify(error)}</p>
<p>{getErrorMessage(error)}</p>
</>
);
}