From 8eee83423a209f4ae4c9c8e34420e643042f9bce Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Mon, 2 Dec 2024 11:23:07 -0500 Subject: [PATCH] [v16] update access request errors to not repeat cluster names (#49642) * 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 * update deduplicate call --------- Co-authored-by: Zac Bergquist --- lib/services/access_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/access_request.go b/lib/services/access_request.go index de954e629d47d..d30fec9f90bc7 100644 --- a/lib/services/access_request.go +++ b/lib/services/access_request.go @@ -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 }