Clarify error when a feature flag user list is in use

What does this MR do and why?

Deleting a feature flag user list that is still attached to a strategy returned the terse error User list is associated with a strategy. The agreed copy from the issue is more specific: it tells the user the list is in use by one or more feature flag strategies and must be removed from those strategies before it can be deleted.

This MR updates that backend error string. The API and the user lists UI both surface the model error, so no frontend change is required.

References

Screenshots or screen recordings

Headless render of the delete error alert with the previous copy and the new copy (same GitLab danger alert treatment the user lists page uses):

Before After
Before: User list is associated with a strategy After: This user list is in use by one or more feature flag strategies and could not be deleted. Remove the list from all strategies before deleting it.

How to set up and validate locally

  1. In a project, create a feature flag user list and attach it to a feature flag strategy.
  2. Go to Deploy > Feature flags, open the user lists, and try to delete that list.
  3. The list is not deleted. The alert now shows: This user list is in use by one or more feature flag strategies and could not be deleted. Remove the list from all strategies before deleting it.
  4. The same message is returned as a 409 from DELETE /api/v4/projects/:id/feature_flags_user_lists/:iid.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Priyanshu Jha

Merge request reports

Loading
Loading