From d8c7f78a8bceeeff2b6a4677b99f60b9e8f5b6a7 Mon Sep 17 00:00:00 2001 From: mcorbin Date: Mon, 15 Jan 2024 00:22:09 +0100 Subject: [PATCH] Change string format for http error messages --- healthcheck/http.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/healthcheck/http.go b/healthcheck/http.go index a9c49eb..bceb63b 100644 --- a/healthcheck/http.go +++ b/healthcheck/http.go @@ -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 }