Skip to content

Commit

Permalink
RHINENG-9505: improve debugging message
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka committed Sep 12, 2024
1 parent e447264 commit 1571a99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions manager/controllers/template_systems_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,11 @@ func callCandlepin(ctx context.Context, consumer string, request *candlepin.Cons
*candlepin.ConsumersUpdateResponse, error) {
candlepinEnvConsumersURL := utils.CoreCfg.CandlepinAddress + "/consumers/" + consumer
candlepinFunc := func() (interface{}, *http.Response, error) {
utils.LogTrace("request", *request, "candlepin /consumers request")
candlepinResp := candlepin.ConsumersUpdateResponse{}
resp, err := candlepinClient.Request(&ctx, http.MethodPut, candlepinEnvConsumersURL, request, &candlepinResp)
statusCode := utils.TryGetStatusCode(resp)
utils.LogDebug("status_code", statusCode, "candlepin /consumers call")
utils.LogTrace("response", resp, "candlepin /consumers response")
utils.LogDebug("request", *request, "candlepin_url", candlepinEnvConsumersURL,
"status_code", statusCode, "err", err)
if err != nil && statusCode == 400 {
err = errors.Wrap(errCandlepin, err.Error())
}
Expand Down

0 comments on commit 1571a99

Please sign in to comment.