mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 15:44:28 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user