Skip to content

Commit

Permalink
feat(rpc): print error body
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Mar 10, 2022
1 parent 4af558a commit 11d8797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func preparePayload(params []interface{}) ([]byte, error) {

func (c *RpcClient) processRpcCall(body []byte, rpcErr error, res interface{}) error {
if rpcErr != nil {
return fmt.Errorf("rpc: call error, err: %v", rpcErr)
return fmt.Errorf("rpc: call error, err: %v, body: %v", rpcErr, string(body))
}
err := json.Unmarshal(body, &res)
if err != nil {
Expand Down

0 comments on commit 11d8797

Please sign in to comment.