Skip to content

Commit 81ef485

Browse files
committed
fixes bug when non-200 response body is read in as maintainer
1 parent 8ec29cc commit 81ef485

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ func slurp_url(url string, token string) string {
101101
}
102102
defer resp.Body.Close()
103103

104-
if resp.StatusCode != 200 && resp.StatusCode != 404 {
105-
stderr("non-200 response from URL: %s (%d)", url, resp.StatusCode)
104+
if resp.StatusCode != 200 {
105+
if resp.StatusCode != 404 {
106+
stderr("non-200 response from URL: %s (%d)", url, resp.StatusCode)
107+
}
106108
return ""
107109
}
108110

0 commit comments

Comments
 (0)