From 22ffaa7131a17f5816ce1ea684ed813647da83cf Mon Sep 17 00:00:00 2001 From: weskubo-cgi Date: Thu, 16 Jun 2022 10:44:21 -0700 Subject: [PATCH] Added fix to handle other error types. --- frontend/src/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/main.js b/frontend/src/main.js index 6a42b7e3..edfddc55 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -33,8 +33,11 @@ keycloak.onReady = async function (authenticated) { permissions = data } } catch (err) { - // An error here indicates that MSP Direct API is unavailable - apiAvailable = false + // Check for network error + // Other errors (401, 403) are possible + if (err.message === 'Network Error') { + apiAvailable = false + } } finally { initApp(permissions, apiAvailable) }