fixed json-rpc debug log outputs

* moved them up a bit to also log something in case of an error

see #482
This commit is contained in:
Bernhard B
2024-03-20 20:52:25 +01:00
parent 3573f6ae95
commit 0d5c23d7ea

View File

@@ -121,13 +121,13 @@ func (r *JsonRpc2Client) getRaw(command string, account *string, args interface{
resp = <-responseChan
delete(r.receivedResponsesById, u.String())
log.Debug("json-rpc command response message: ", string(resp.Result))
log.Debug("json-rpc response error: ", string(resp.Err.Message))
if resp.Err.Code != 0 {
return "", errors.New(resp.Err.Message)
}
log.Debug("json-rpc command response message: ", string(resp.Result))
log.Debug("json-rpc response error: ", string(resp.Err.Message))
return string(resp.Result), nil
}