From 6609322559d3c8e7489895c5f3765c8ce3a0ad47 Mon Sep 17 00:00:00 2001 From: Amardeepsingh Siglani Date: Wed, 22 Feb 2023 11:50:32 -0800 Subject: [PATCH] suppress unwanted error notification (#456) Signed-off-by: Amardeepsingh Siglani --- 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); } }