Handle *btcjson.Error errors from RPC handlers.

The btcrpcclient package returns RPC errors as *btcjson.Error, but
wallet was only handling btcjson.Error (no pointer) as special.
Handle both.
This commit is contained in:
Josh Rickmar 2014-07-08 15:41:59 -05:00
parent 35b929aa6b
commit b42ab5b743

View file

@ -1053,6 +1053,8 @@ out:
switch e := err.(type) {
case btcjson.Error:
*jsonErr = e
case *btcjson.Error:
*jsonErr = *e
case DeserializationError:
jsonErr.Code = btcjson.ErrDeserialization.Code
case InvalidParameterError: