From 3329992fda6beefe241782d278ffa9ab080d49b3 Mon Sep 17 00:00:00 2001 From: Georgii Karataev Date: Mon, 15 Jan 2024 13:24:38 +0100 Subject: [PATCH] fix(RHINENG-7083): Temporarily ignore 403 when checking hosts count --- src/Routes.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Routes.js b/src/Routes.js index d0cbff8bb..52d73244e 100644 --- a/src/Routes.js +++ b/src/Routes.js @@ -58,8 +58,8 @@ export const Routes = () => { useEffect(() => { // zero state check - try { - (async () => { + (async () => { + try { const hasConventionalSystems = await inventoryHasConventionalSystems(); setHasConventionalSystems(hasConventionalSystems); @@ -69,10 +69,14 @@ export const Routes = () => { } setIsLoading(false); - })(); - } catch (e) { - console.error(e); - } + } catch (error) { + console.error(error); + + if (error.response.status === 403) { + setIsLoading(false); + } + } + })(); }, []); let element = useRoutes([