From fa1fa401fcb43166bc2e558e8cf165b8e8e5f378 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Mon, 2 Dec 2024 10:23:32 -0500 Subject: [PATCH] update access request errors to not repeat cluster names (#49600) * 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 4ac9fe9aea31d..1e3ef0c8fb9de 100644 --- a/lib/services/access_request.go +++ b/lib/services/access_request.go @@ -121,7 +121,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 }