Skip to content

Commit

Permalink
fixes bug when non-200 response body is read in as maintainer
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh-0 committed May 30, 2023
1 parent 8ec29cc commit 81ef485
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ func slurp_url(url string, token string) string {
}
defer resp.Body.Close()

if resp.StatusCode != 200 && resp.StatusCode != 404 {
stderr("non-200 response from URL: %s (%d)", url, resp.StatusCode)
if resp.StatusCode != 200 {
if resp.StatusCode != 404 {
stderr("non-200 response from URL: %s (%d)", url, resp.StatusCode)
}
return ""
}

Expand Down

0 comments on commit 81ef485

Please sign in to comment.