Skip to content

Commit

Permalink
fix(tag/remote): check if resp is not nil before analyzing it
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanilves committed May 6, 2018
1 parent 1f0920e commit 826db81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tag/remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ func httpRetriableRequest(url, authorization, mode string) (*http.Response, erro
return resp, nil
}

if resp.StatusCode >= 400 && resp.StatusCode < 500 {
return nil, err
if resp != nil {
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
return nil, err
}
}

if try < tries {
Expand Down

0 comments on commit 826db81

Please sign in to comment.