Skip to content

Commit

Permalink
add err body (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
defisaur authored Dec 19, 2023
1 parent 1d4cb3d commit 7b40d46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ type HttpError struct {
}

func (e *HttpError) Error() string {
return fmt.Sprintf("Failed request status %d for url: (%s)", e.StatusCode, e.URL.RequestURI())
return fmt.Sprintf(
"Failed request status %d for url: (%s), body: (%s)",
e.StatusCode,
e.URL.RequestURI(),
string(e.Body),
)
}

type HttpErrorHandler func(res *http.Response, uri string) error
Expand Down

0 comments on commit 7b40d46

Please sign in to comment.