mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-21 14:35:22 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user