From: Tom Clegg Date: Tue, 5 Jul 2022 13:57:23 +0000 (-0400) Subject: 19166: Improve error messages. X-Git-Tag: 2.5.0~106^2~7 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/bad3a575113abaf7a232f85dd15c4d1e1b60c0e2 19166: Improve error messages. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/lib/controller/localdb/container_gateway.go b/lib/controller/localdb/container_gateway.go index 90c95deb35..77c5182e9c 100644 --- a/lib/controller/localdb/container_gateway.go +++ b/lib/controller/localdb/container_gateway.go @@ -187,7 +187,7 @@ func (conn *Conn) ContainerSSH(ctx context.Context, opts arvados.ContainerSSHOpt }) 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() diff --git a/lib/controller/rpc/conn.go b/lib/controller/rpc/conn.go index 1475a5e01f..0e532f23c0 100644 --- a/lib/controller/rpc/conn.go +++ b/lib/controller/rpc/conn.go @@ -414,7 +414,7 @@ func (conn *Conn) socket(ctx context.Context, u *url.URL, upgradeHeader string, } 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" {