Skip to content

Commit

Permalink
Fix wrong logging for wrong fleet api version response (#3673) (#3702)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5f891b0)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
  • Loading branch information
mergify[bot] and pchila committed Nov 6, 2023
1 parent 3c8be72 commit c359647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit c359647

Please sign in to comment.