From e23190b6b3ddd16b3a5f951a33e05fd75ebb8970 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 17 Feb 2014 15:28:30 -0800 Subject: [PATCH] Improve error message only if no body is returned Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- api/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client.go b/api/client.go index 3dd867f771..81e337b023 100644 --- a/api/client.go +++ b/api/client.go @@ -2086,7 +2086,7 @@ func (cli *DockerCli) call(method, path string, data interface{}, passAuthInfo b return nil, -1, err } if len(body) == 0 { - return nil, resp.StatusCode, fmt.Errorf("Error :%s", http.StatusText(resp.StatusCode)) + return nil, resp.StatusCode, fmt.Errorf("Error: request returned %s for api route and version %s, check if the server supports the requested api version", http.StatusText(resp.StatusCode), req.URL) } return nil, resp.StatusCode, fmt.Errorf("Error: %s", bytes.TrimSpace(body)) }