Use btcjson.ErrWallet for createencryptedwallet.
If an unexpected error is encounted when creating the encrypted wallet, rather than using btcjson.ErrInternal, wrap the error message using btcjson.ErrWallet.Code.
This commit is contained in:
parent
55564dc31f
commit
733677433d
1 changed files with 4 additions and 1 deletions
|
@ -1721,7 +1721,10 @@ func CreateEncryptedWallet(icmd btcjson.Cmd) (interface{}, *btcjson.Error) {
|
||||||
return nil, &ErrBtcdDisconnected
|
return nil, &ErrBtcdDisconnected
|
||||||
|
|
||||||
default: // all other non-nil errors
|
default: // all other non-nil errors
|
||||||
return nil, &btcjson.ErrInternal
|
return nil, &btcjson.Error{
|
||||||
|
Code: btcjson.ErrWallet.Code,
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue