fix(ux): friendly error UI вместо raw AxiosError

This commit is contained in:
Александр Зимин
2026-05-12 12:41:48 +00:00
parent db0986d235
commit 3984d99004
14 changed files with 274 additions and 57 deletions
@@ -13,7 +13,7 @@ import {
} from 'd3-force'
import { useDictionaries, dictionaryDependentsQuery, recordsQuery } from '@/api/queries'
import type { DictionaryDefinition, SchemaDependent } from '@/api/client'
import { GlobeLoader, LoadingBlock } from '@/ui'
import { GlobeLoader, LoadingBlock, QueryErrorState } from '@/ui'
import { cn } from '@/lib/utils'
// 3D-режим лениво грузится — three.js (~650kb) и react-force-graph-3d не
@@ -165,7 +165,7 @@ export function DictionaryGraph() {
}
if (dictsQuery.error) {
return <div className="text-body text-pink">Ошибка загрузки: {String(dictsQuery.error)}</div>
return <QueryErrorState error={dictsQuery.error} onRetry={() => dictsQuery.refetch()} />
}
if (dicts.length === 0) {