From 9d81909368a7eae2321015e4823b5db539087c0e Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:52:06 -0800 Subject: [PATCH] suppress unwanted error notification (#456) (#457) Signed-off-by: Amardeepsingh Siglani (cherry picked from commit 6609322559d3c8e7489895c5f3765c8ce3a0ad47) Co-authored-by: Amardeepsingh Siglani Signed-off-by: AWSHurneyt --- public/pages/Detectors/containers/Detectors/Detectors.tsx | 2 +- public/pages/Overview/models/OverviewViewModel.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/pages/Detectors/containers/Detectors/Detectors.tsx b/public/pages/Detectors/containers/Detectors/Detectors.tsx index b2dd73265..e31526703 100644 --- a/public/pages/Detectors/containers/Detectors/Detectors.tsx +++ b/public/pages/Detectors/containers/Detectors/Detectors.tsx @@ -88,7 +88,7 @@ export default class Detectors extends Component }; }); this.setState({ detectorHits: detectors }); - } else { + } else if (!res.error.includes('no such index')) { errorNotificationToast(notifications, 'retrieve', 'detectors', res.error); } } catch (e) { diff --git a/public/pages/Overview/models/OverviewViewModel.ts b/public/pages/Overview/models/OverviewViewModel.ts index 3a9979405..429b21b74 100644 --- a/public/pages/Overview/models/OverviewViewModel.ts +++ b/public/pages/Overview/models/OverviewViewModel.ts @@ -39,7 +39,7 @@ export class OverviewViewModelActor { const res = await this.services?.detectorsService.getDetectors(); if (res?.ok) { this.overviewViewModel.detectors = res.response.hits.hits; - } else { + } else if (!res?.error.includes('no such index')) { errorNotificationToast(this.notifications, 'retrieve', 'detectors', res.error); } }