From 8209c96bbbc7823afff2c0780738d3bb0b148fdc Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Mon, 2 Dec 2024 11:23:38 -0500 Subject: [PATCH] [v15] update access request errors to not repeat cluster names (#49643) * 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 19a9c33bd8064..fd7ee8e9cb225 100644 --- a/lib/services/access_request.go +++ b/lib/services/access_request.go @@ -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 }