Skip to content

Commit

Permalink
fix: add log line if cohorts are targeted but not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Aug 2, 2024
1 parent adae933 commit 4a2d1c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/LocalEvaluationClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ class LocalEvaluationClient internal constructor(
private fun enrichUser(user: ExperimentUser, flagConfigs: List<EvaluationFlag>): ExperimentUser {
val groupedCohortIds = flagConfigs.getGroupedCohortIds()
if (cohortStorage == null) {
if (groupedCohortIds.isNotEmpty()) {
Logger.e("Local evaluation flags target cohorts but cohort targeting is not configured.")
}
return user
}
return user.copyToBuilder().apply {
Expand Down

0 comments on commit 4a2d1c7

Please sign in to comment.