diff --git a/requests.go b/requests.go index 581c08c..cac0d8a 100644 --- a/requests.go +++ b/requests.go @@ -38,6 +38,9 @@ func (c *Client) req(method, path string, body io.Reader, intercept func(*http.R } rs, err := c.c.Do(r) + if err != nil { + return nil, err + } if rs.StatusCode == 401 && c.auth.Type() == "NoAuth" { if strings.Index(rs.Header.Get("Www-Authenticate"), "Digest") > -1 {