From 71495f3501460587eefc15481595bf68810d1009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paolo=20Chil=C3=A0?= Date: Fri, 3 Nov 2023 18:31:57 +0100 Subject: [PATCH] Fix wrong logging for wrong fleet api version response (#3673) (cherry picked from commit 5f891b0664cd453ed40a48321f4c97f80b62a784) --- internal/pkg/remote/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/remote/client.go b/internal/pkg/remote/client.go index 9a3f3d974d3..1a1e8de068c 100644 --- a/internal/pkg/remote/client.go +++ b/internal/pkg/remote/client.go @@ -240,7 +240,7 @@ func (c *Client) checkApiVersionHeaders(reqID string, resp *http.Response) { if downgradeVersion := resp.Header.Get(elasticApiVersionHeaderKey); resp.StatusCode == http.StatusBadRequest && downgradeVersion != "" { // fleet server requested a downgrade to a different api version, we should bubble up an error until some kind // of fallback mechanism can instantiate the requested version. This is not yet implemented so we log an error - c.log.With("http.request.id", reqID).Errorf("fleet requested a different api version %q but this is currently not implemented: %q", downgradeVersion) + c.log.With("http.request.id", reqID).Errorf("fleet requested a different api version %q but this is currently not implemented", downgradeVersion) } }