|
1 | 1 | import {useContext, useEffect, useMemo} from 'react'; |
2 | 2 | import cn from 'bem-cn-lite'; |
3 | 3 | import {connect} from 'react-redux'; |
4 | | -import InternalLink from '../../../../components/InternalLink/InternalLink'; |
| 4 | +import {Loader} from '@yandex-cloud/uikit'; |
5 | 5 | import DataTable from '@yandex-cloud/react-data-table'; |
6 | | -import routes, {createHref} from '../../../../routes'; |
7 | 6 |
|
| 7 | +import InternalLink from '../../../../components/InternalLink/InternalLink'; |
| 8 | + |
| 9 | +import routes, {createHref} from '../../../../routes'; |
8 | 10 | import {sendShardQuery, setShardQueryOptions} from '../../../../store/reducers/shardsWorkload'; |
9 | 11 | import {setCurrentSchemaPath, getSchema} from '../../../../store/reducers/schema'; |
10 | 12 | import {AutoFetcher} from '../../../../utils/autofetcher'; |
11 | | - |
12 | 13 | import HistoryContext from '../../../../contexts/HistoryContext'; |
13 | | - |
14 | | -import './TopShards.scss'; |
15 | 14 | import {DEFAULT_TABLE_SETTINGS} from '../../../../utils/constants'; |
16 | | -import {Loader} from '@yandex-cloud/uikit'; |
17 | 15 | import {OLAP_STORE_TYPE, OLAP_TABLE_TYPE} from '../../Tenant'; |
| 16 | +import {prepareQueryError} from '../../../../utils'; |
| 17 | + |
| 18 | +import './TopShards.scss'; |
18 | 19 |
|
19 | 20 | const b = cn('top-shards'); |
20 | 21 | const bLink = cn('yc-link'); |
@@ -123,7 +124,7 @@ function TopShards({ |
123 | 124 | return 'No data'; |
124 | 125 | } |
125 | 126 | if (error) { |
126 | | - return error.data?.error?.message || error.data || error; |
| 127 | + return prepareQueryError(error); |
127 | 128 | } |
128 | 129 |
|
129 | 130 | return data && data.length > 0 ? ( |
|
0 commit comments