Skip to content

Commit

Permalink
Merge pull request tendermint#57 from binance-chain/unresponse
Browse files Browse the repository at this point in the history
[R4R]print unexpected response
  • Loading branch information
rickyyangz authored Mar 19, 2019
2 parents 7a58359 + 48aeb4d commit 3e7e0dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/lib/client/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ func unmarshalResponseBytes(cdc *amino.Codec, responseBytes []byte, result inter
response := &types.RPCResponse{}
err = json.Unmarshal(responseBytes, response)
if err != nil {
return nil, errors.Errorf("Error unmarshalling rpc response: %v", err)
return nil, errors.Errorf("Error unmarshalling rpc response %s, error %v", string(responseBytes), err)
}
if response.Error != nil {
return nil, errors.Errorf("Response error: %v", response.Error)
}
// Unmarshal the RawMessage into the result.
err = cdc.UnmarshalJSON(response.Result, result)
if err != nil {
return nil, errors.Errorf("Error unmarshalling rpc response result: %v", err)
return nil, errors.Errorf("Error unmarshalling rpc response result %s, error %v", string(response.Result), err)
}
return result, nil
}
Expand Down

0 comments on commit 3e7e0dc

Please sign in to comment.