Skip to content

Commit

Permalink
[v15] update access request errors to not repeat cluster names (#49643)
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 f30af31 commit 8209c96
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 @@ -110,7 +110,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 8209c96

Please sign in to comment.