Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions api/client/proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ func NewClient(ctx context.Context, cfg ClientConfig) (*Client, error) {
}

clt, sshErr := newSSHClient(ctx, &cfg)
if sshErr == nil {
return clt, nil
// Only aggregate errors if there was an issue dialing the grpc server so
// that helpers like trace.IsAccessDenied will still work.
if grpcErr == nil {
return clt, trace.Wrap(sshErr)
Comment thread
GavinFrazar marked this conversation as resolved.
}

return nil, trace.NewAggregate(grpcErr, sshErr)
Expand Down Expand Up @@ -241,7 +243,7 @@ func (c *clusterName) set(name string) {
// clusterCredentials is a [credentials.TransportCredentials] implementation
// that obtains the name of the cluster being connected to from the certificate
// presented by the server. This allows the client to determine the cluster name when
// connecting via using jump hosts.
// connecting via jump hosts.
type clusterCredentials struct {
credentials.TransportCredentials
clusterName *clusterName
Expand Down
2 changes: 1 addition & 1 deletion api/utils/grpc/stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c *ReadWriter) Write(b []byte) (int, error) {
}

if err := c.source.Send(chunk); err != nil {
return sent, trace.ConnectionProblem(trail.FromGRPC(err), "failed to send on source")
return sent, trace.ConnectionProblem(trail.FromGRPC(err), "failed to send on source: %v", err)
}

sent += len(chunk)
Expand Down
Loading