Skip to content

Commit

Permalink
Change string format for http error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Jan 14, 2024
1 parent 32d37dc commit d8c7f78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions healthcheck/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ func (h *HTTPHealthcheck) Execute() error {
message = responseBodyStr[0:maxMessageSize]
}
if !h.isSuccessful(response) {

errorMsg := fmt.Sprintf("HTTP request failed: (status %d) => %s", response.StatusCode, html.EscapeString(message))
errorMsg := fmt.Sprintf("HTTP request failed: status %d. Body: '%s'", response.StatusCode, html.EscapeString(message))
err = errors.New(errorMsg)
return err
}
Expand Down

0 comments on commit d8c7f78

Please sign in to comment.