Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
})
err = tlsconn.HandshakeContext(ctx)
if err != nil {
- return sshconn, httpserver.ErrorWithStatus(err, http.StatusBadGateway)
+ return sshconn, httpserver.ErrorWithStatus(fmt.Errorf("TLS handshake failed: %w", err), http.StatusBadGateway)
}
if respondAuth == "" {
tlsconn.Close()
} else {
message = fmt.Sprintf("%q", body)
}
- return connresp, fmt.Errorf("server did not provide a tunnel: %s %s", resp.Status, message)
+ return connresp, fmt.Errorf("server did not provide a tunnel: %s: %s", resp.Status, message)
}
if strings.ToLower(resp.Header.Get("Upgrade")) != upgradeHeader ||
strings.ToLower(resp.Header.Get("Connection")) != "upgrade" {