Clears errors after running new query (#30367)

This commit is contained in:
Ivana Huckova 2021-01-19 10:47:40 +01:00 committed by GitHub
parent 32c51215c4
commit 1cecc7f9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -312,7 +312,8 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
const isLoading = queryResponse.state === LoadingState.Loading;
// gets an error without a refID, so non-query-row-related error, like a connection error
const queryErrors = queryResponse.error ? [queryResponse.error] : undefined;
const queryErrors =
queryResponse.state === LoadingState.Error && queryResponse.error ? [queryResponse.error] : undefined;
const queryError = getFirstNonQueryRowSpecificError(queryErrors);
const showRichHistory = openDrawer === ExploreDrawer.RichHistory;

View File

@ -37,9 +37,7 @@ exports[`Explore should render component 1`] = `
richHistoryButtonActive={false}
/>
</div>
<ErrorContainer
queryError={Object {}}
/>
<ErrorContainer />
<AutoSizer
disableHeight={true}
disableWidth={false}

View File

@ -657,7 +657,7 @@ export const processQueryResponse = (
return {
...state,
loading: false,
loading: loadingState === LoadingState.Loading || loadingState === LoadingState.Streaming,
queryResponse: response,
graphResult: null,
tableResult: null,