Wrap rpc error object

This commit is contained in:
Joel May 2020-10-15 21:40:51 +00:00
parent a3f8aa20dd
commit 8c6d6648cd
1 changed files with 2 additions and 2 deletions

View File

@ -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