Skip to content

Commit 49611e9

Browse files
Update kubeconfig provider to return multicluster.ErrClusterNotFound when cluster isn't found
Signed-off-by: Codey Jenkins <[email protected]>
1 parent b545226 commit 49611e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

providers/kubeconfig/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (p *Provider) addIndexer(idx index) {
132132
func (p *Provider) Get(ctx context.Context, clusterName string) (cluster.Cluster, error) {
133133
ac, exists := p.getCluster(clusterName)
134134
if !exists {
135-
return nil, fmt.Errorf("cluster %s not found", clusterName)
135+
return nil, multicluster.ErrClusterNotFound
136136
}
137137
return ac.Cluster, nil
138138
}

0 commit comments

Comments
 (0)