Skip to content

Commit

Permalink
add to pre-endpoint check
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy committed Sep 18, 2023
1 parent 7d021f6 commit 5be4dbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/atlas-service/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export async function throwIfNotOk(
}

function throwIfAINotEnabled(atlasService: typeof AtlasService) {
if (!preferences.getPreferences().cloudFeatureRolloutAccess?.GEN_AI_COMPASS) {
if (
!preferences.getPreferences().cloudFeatureRolloutAccess?.GEN_AI_COMPASS &&
!preferences.getPreferences().enableAIWithoutRolloutAccess
) {
throw new Error(
"Compass' AI functionality is not currently enabled. Please try again later."
);
Expand Down

0 comments on commit 5be4dbb

Please sign in to comment.