Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't expect /licenses to work for oss query service (#6763) #6826

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading