Skip to content

Commit 83c214a

Browse files
committed
fix: responses with status code 400 don't throw an error
1 parent a528f9b commit 83c214a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iis/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func fetchBody(res *http.Response) ([]byte, error) {
101101
}
102102

103103
func guardStatusCode(method string, url *url.URL, response *http.Response) error {
104-
if response.StatusCode < 200 || response.StatusCode > 400 {
104+
if response.StatusCode < 200 || response.StatusCode >= 400 {
105105
var body string
106106
if buffer, err := fetchBody(response); err == nil {
107107
body = string(buffer[:])

0 commit comments

Comments
 (0)