diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx index 5875a31d87..3b58eb18a9 100644 --- a/frontend/src/AppRoutes/index.tsx +++ b/frontend/src/AppRoutes/index.tsx @@ -227,6 +227,10 @@ function App(): JSX.Element { } }, [user, isFetchingUser, isCloudUserVal, enableAnalytics]); + const isOss = featureFlags?.some( + (flag) => flag.name === FeatureKeys.OSS && flag.active, + ); + // if the user is in logged in state if (isLoggedInState) { if (pathname === ROUTES.HOME_PAGE) { @@ -241,7 +245,7 @@ function App(): JSX.Element { // this needs to be on top of data missing error because if there is an error, data will never be loaded and it will // move to indefinitive loading if ( - (userFetchError || licensesFetchError) && + (userFetchError || (licensesFetchError && featureFlags && !isOss)) && // oss query service does not have licenses API pathname !== ROUTES.SOMETHING_WENT_WRONG ) { history.replace(ROUTES.SOMETHING_WENT_WRONG);