Commit 1cecc7f9 by Ivana Huckova Committed by GitHub

Clears errors after running new query (#30367)

parent 32c51215
......@@ -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;
......
......@@ -37,9 +37,7 @@ exports[`Explore should render component 1`] = `
richHistoryButtonActive={false}
/>
</div>
<ErrorContainer
queryError={Object {}}
/>
<ErrorContainer />
<AutoSizer
disableHeight={true}
disableWidth={false}
......
......@@ -657,7 +657,7 @@ export const processQueryResponse = (
return {
...state,
loading: false,
loading: loadingState === LoadingState.Loading || loadingState === LoadingState.Streaming,
queryResponse: response,
graphResult: null,
tableResult: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment