Skip to content

Commit

Permalink
update http response error
Browse files Browse the repository at this point in the history
  • Loading branch information
glossd committed Dec 13, 2024
1 parent cb9b50c commit 2b6f031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func Do[T any](url string, config ...Config) (T, error) {
}

if firstDigit(res.StatusCode) != 2 {
return t, httpErr(fmt.Sprintf("http status=%d, body=", res.StatusCode), errors.New(string(body)), res, body)
return t, httpErr(fmt.Sprintf("http response with status=%d, body: ", res.StatusCode), errors.New(string(body)), res, body)
}

if isResponseWrapper(t) {
Expand Down

0 comments on commit 2b6f031

Please sign in to comment.