Unify errors returned from ProxyClient when targets are ambiguous (#25004)

Ensures that SSH and gRPC connections via `tsh` return the same
error when dialing a host fails.

Closes #24943
This commit is contained in:
rosstimothy
2023-04-21 20:36:47 +00:00
committed by GitHub
parent 091b1db314
commit b6b57bcfe8
+1 -1
View File
@@ -519,7 +519,7 @@ func (c *Client) DialHost(ctx context.Context, target, cluster string, keyring a
conn, details, err := c.transport.DialHost(ctx, target, cluster, nil, keyring)
if err != nil {
return nil, ClusterDetails{}, trace.Wrap(err)
return nil, ClusterDetails{}, trace.ConnectionProblem(err, "failed connecting to host %s: %v", target, err)
}
return conn, ClusterDetails{FIPS: details.FipsEnabled}, nil