Skip to content

Commit

Permalink
print unexpected response
Browse files Browse the repository at this point in the history
  • Loading branch information
unclezoro committed Mar 14, 2019
1 parent 25966b7 commit 48aeb4d
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 @@ -187,15 +187,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 48aeb4d

Please sign in to comment.