diff --git a/tools/remote_caller.go b/tools/remote_caller.go index 986819f..a444427 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -77,7 +77,7 @@ func (caller *HTTPCaller) CallPost(url string, subpath string, body map[string]i postBody, _ := json.Marshal(body) responseBody := bytes.NewBuffer(postBody) resp, err := http.Post(url+subpath, "application/json", responseBody) - if err != nil { + if err != nil || resp == nil || resp.Body == nil { return nil, err } defer resp.Body.Close()