From 95ed6ec1438464342ac92ef3259026208de1f947 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 10 Nov 2020 17:04:11 -0500 Subject: [PATCH] Merge pull request #8976 from joel0/wrap-eof 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 c4924f1752..8a1df2412a 100644 --- a/agent/pool/pool.go +++ b/agent/pool/pool.go @@ -601,7 +601,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 @@ -618,7 +618,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