Skip to content

Commit

Permalink
fix: don't expect /licenses to work for oss query service (#6763)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgilham committed Jan 16, 2025
1 parent 265c67e commit 87dc3e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/AppRoutes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 87dc3e0

Please sign in to comment.