Skip to content

Commit

Permalink
feat(flags): add support for matching static cohort membership (#25942)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarticus authored Nov 16, 2024
1 parent 4ce7e9c commit f5a567f
Show file tree
Hide file tree
Showing 4 changed files with 637 additions and 80 deletions.
5 changes: 5 additions & 0 deletions rust/feature-flags/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ pub enum FlagError {
CohortFiltersParsingError,
#[error("Cohort dependency cycle")]
CohortDependencyCycle(String),
#[error("Person not found")]
PersonNotFound,
}

impl IntoResponse for FlagError {
Expand Down Expand Up @@ -212,6 +214,9 @@ impl IntoResponse for FlagError {
tracing::error!("Cohort dependency cycle: {}", msg);
(StatusCode::BAD_REQUEST, msg)
}
FlagError::PersonNotFound => {
(StatusCode::BAD_REQUEST, "Person not found. Please check your distinct_id and try again.".to_string())
}
}
.into_response()
}
Expand Down
Loading

0 comments on commit f5a567f

Please sign in to comment.