unhide error message from jsonRpcSend
This commit is contained in:
parent
4ab8ca5eef
commit
27b69ccca3
2 changed files with 2 additions and 4 deletions
|
@ -708,7 +708,7 @@ func RpcCommand(user string, password string, server string, message []byte) (Re
|
|||
}
|
||||
resp, err := jsonRpcSend(user, password, server, message)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error Sending json message.")
|
||||
err := fmt.Errorf("Error sending json message: "+err.Error())
|
||||
return result, err
|
||||
}
|
||||
body, err := GetRaw(resp.Body)
|
||||
|
|
|
@ -34,9 +34,7 @@ func MarshallAndSend(rawReply Reply, w io.Writer) (string, error) {
|
|||
func jsonRpcSend(user string, password string, server string, message []byte) (*http.Response, error) {
|
||||
resp, err := http.Post("http://"+user+":"+password+"@"+server,
|
||||
"application/json", bytes.NewBuffer(message))
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error Sending json message.")
|
||||
}
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue