mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Discover] hide cancelled request error (#137690)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
05f2072586
commit
dcdb7ca6dd
1 changed files with 3 additions and 1 deletions
|
@ -165,6 +165,7 @@ export class SavedSearchEmbeddable
|
|||
|
||||
const { searchSource } = this.savedSearch;
|
||||
|
||||
const prevAbortController = this.abortController;
|
||||
// Abort any in-progress requests
|
||||
if (this.abortController) this.abortController.abort();
|
||||
this.abortController = new AbortController();
|
||||
|
@ -266,7 +267,8 @@ export class SavedSearchEmbeddable
|
|||
this.searchProps!.totalHitCount = resp.hits.total as number;
|
||||
this.searchProps!.isLoading = false;
|
||||
} catch (error) {
|
||||
if (!this.destroyed) {
|
||||
const cancelled = !!prevAbortController?.signal.aborted;
|
||||
if (!this.destroyed && !cancelled) {
|
||||
this.updateOutput({
|
||||
...this.getOutput(),
|
||||
loading: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue