From a34dbc4942243092cda627887b0c99d77073c3cf Mon Sep 17 00:00:00 2001 From: Palash gupta Date: Fri, 13 May 2022 10:43:26 +0530 Subject: [PATCH] chore: error checking condition !=200 is moved to >=400 --- frontend/src/container/ListAlertRules/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/container/ListAlertRules/index.tsx b/frontend/src/container/ListAlertRules/index.tsx index 9d1f502355..2b81729e7e 100644 --- a/frontend/src/container/ListAlertRules/index.tsx +++ b/frontend/src/container/ListAlertRules/index.tsx @@ -15,7 +15,7 @@ function ListAlertRules(): JSX.Element { }); useEffect(() => { - if (status === 'error' || (status === 'success' && data.statusCode !== 200)) { + if (status === 'error' || (status === 'success' && data.statusCode >= 400)) { notification.error({ message: data?.error || t('something_went_wrong'), }); @@ -28,7 +28,7 @@ function ListAlertRules(): JSX.Element { } // api is successful but error is present - if (status === 'success' && data.statusCode !== 200) { + if (status === 'success' && data.statusCode >= 400) { return (