diff --git a/tools/remote_caller.go b/tools/remote_caller.go index a444427..4d05476 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -65,7 +65,7 @@ func (caller *HTTPCaller) CallGet(url string, subpath string) ([]byte, error) { // CallPut calls the DELETE method on the HTTP server func (caller *HTTPCaller) CallDelete(url string, subpath string) ([]byte, error) { resp, err := http.NewRequest("DELETE", url+subpath, nil) - if err != nil { + if err != nil || resp == nil || resp.Body == nil { return nil, err } defer resp.Body.Close()