Make RPCError an actual error and don't swallow its companion data

This commit is contained in:
Silas Davis
2017-10-22 15:14:21 +01:00
parent d4634dc683
commit 3e3d53daef
4 changed files with 27 additions and 3 deletions

View File

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