From 8c6d6648cd4f63a2aa2424c95b9197d2639ea178 Mon Sep 17 00:00:00 2001 From: Joel May Date: Thu, 15 Oct 2020 21:40:51 +0000 Subject: [PATCH] Wrap rpc error object --- agent/pool/pool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/pool/pool.go b/agent/pool/pool.go index d081dfe174..9ed9991c5c 100644 --- a/agent/pool/pool.go +++ b/agent/pool/pool.go @@ -594,7 +594,7 @@ func (p *ConnPool) rpc(dc string, nodeName string, addr net.Addr, method string, // Get a usable client conn, sc, err := p.getClient(dc, nodeName, addr) if err != nil { - return fmt.Errorf("rpc error getting client: %v", err) + return fmt.Errorf("rpc error getting client: %w", err) } // Make the RPC call @@ -611,7 +611,7 @@ func (p *ConnPool) rpc(dc string, nodeName string, addr net.Addr, method string, } p.releaseConn(conn) - return fmt.Errorf("rpc error making call: %v", err) + return fmt.Errorf("rpc error making call: %w", err) } // Done with the connection