Skip to content

Commit

Permalink
[v16] update access request errors to not repeat cluster names (#49642)
Browse files Browse the repository at this point in the history
* update access request errors to not repeat cluster names

* lint fix for access request

* update to use deduplication for invalid cluster names

Co-authored-by: Zac Bergquist <[email protected]>

* update deduplicate call

---------

Co-authored-by: Zac Bergquist <[email protected]>
  • Loading branch information
stevenGravy and zmb3 authored Dec 2, 2024
1 parent 33f2eaf commit 8eee834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/access_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func ValidateAccessRequestClusterNames(cg ClusterGetter, ar types.AccessRequest)
}
if len(invalidClusters) > 0 {
return trace.NotFound("access request contains invalid or unknown cluster names: %v",
strings.Join(invalidClusters, ", "))
strings.Join(apiutils.Deduplicate(invalidClusters), ", "))
}
return nil
}
Expand Down

0 comments on commit 8eee834

Please sign in to comment.