mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
Make RPCError an actual error and don't swallow its companion data
This commit is contained in:
@ -147,7 +147,7 @@ func unmarshalResponseBytes(responseBytes []byte, result interface{}) (interface
|
||||
return nil, errors.Errorf("Error unmarshalling rpc response: %v", err)
|
||||
}
|
||||
if response.Error != nil {
|
||||
return nil, errors.Errorf("Response error: %v", response.Error.Message)
|
||||
return nil, errors.Errorf("Response error: %v", response.Error)
|
||||
}
|
||||
// unmarshal the RawMessage into the result
|
||||
err = json.Unmarshal(*response.Result, result)
|
||||
|
@ -437,7 +437,7 @@ func (c *WSClient) readRoutine() {
|
||||
continue
|
||||
}
|
||||
if response.Error != nil {
|
||||
c.ErrorsCh <- errors.New(response.Error.Message)
|
||||
c.ErrorsCh <- response.Error
|
||||
continue
|
||||
}
|
||||
c.Logger.Info("got response", "resp", response.Result)
|
||||
|
Reference in New Issue
Block a user