From bad3a575113abaf7a232f85dd15c4d1e1b60c0e2 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 5 Jul 2022 09:57:23 -0400 Subject: [PATCH] 19166: Improve error messages. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/controller/localdb/container_gateway.go | 2 +- lib/controller/rpc/conn.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" { -- 2.30.2