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

@@ -22,6 +22,7 @@ import { GET_SOURCE_MIGRATABLE } from '@/lib/graphql/queries/SourceQuery.ts';
import { SOURCE_BASE_FIELDS } from '@/lib/graphql/fragments/SourceFragments.ts';
import { BaseMangaGrid } from '@/modules/manga/components/BaseMangaGrid.tsx';
import { GridLayout } from '@/modules/core/Core.types.ts';
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
export const Migrate = () => {
const { t } = useTranslation();
@@ -101,7 +102,7 @@ export const Migrate = () => {
return (
<EmptyViewAbsoluteCentered
message={t('global.error.label.failed_to_load_data')}
messageExtra={error.message}
messageExtra={getErrorMessage(error)}
retry={() => {
if (hasErrorSource) {
refetchSource().catch(defaultPromiseErrorHandler('Migrate::refetchSource'));

View File

@@ -102,7 +102,7 @@ export const Migration = ({ tabsMenuHeight }: { tabsMenuHeight: number }) => {
return (
<EmptyViewAbsoluteCentered
message={t('global.error.label.failed_to_load_data')}
messageExtra={error.message}
messageExtra={getErrorMessage(error)}
retry={() => refetch().catch(defaultPromiseErrorHandler('Migration::refetch'))}
/>
);