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:
parent
35b929aa6b
commit
b42ab5b743
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue