Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Commit 87c2841

Browse files
committed
Add error check for HTTP response
1 parent bb704c7 commit 87c2841

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

digest_auth_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func (dr *DigestRequest) Execute() (resp *http.Response, err error) {
4848
}
4949
resp, err = client.Do(req)
5050

51+
if err != nil {
52+
return nil, err
53+
}
54+
5155
if resp.StatusCode == 401 {
5256
return dr.executeNewDigest(resp)
5357
}

0 commit comments

Comments
 (0)