File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
containers/Tenant/Query/QueryResult/components/QueryResultError Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import { cn } from '../../../../../../utils/cn' ;
22import { parseQueryError } from '../../../../../../utils/query' ;
3+ import { isNetworkError } from '../../../../../../utils/response' ;
34import { ResultIssues } from '../../../Issues/Issues' ;
45import { isQueryCancelledError } from '../../../utils/isQueryCancelledError' ;
56
@@ -16,6 +17,10 @@ export function QueryResultError({error}: {error: unknown}) {
1617 return null ;
1718 }
1819
20+ if ( isNetworkError ( error ) ) {
21+ return < div className = { b ( 'message' ) } > { error . message } </ div > ;
22+ }
23+
1924 if ( typeof parsedError === 'object' ) {
2025 return < ResultIssues data = { parsedError } /> ;
2126 }
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ export const isNetworkError = (error: unknown): error is NetworkError => {
77 error &&
88 typeof error === 'object' &&
99 'message' in error &&
10- error . message === 'Network Error' ,
10+ typeof error . message === 'string' &&
11+ error . message . toLowerCase ( ) === 'network error' ,
1112 ) ;
1213} ;
1314
You can’t perform that action at this time.
0 commit comments