Skip to content

Commit

Permalink
fix: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
claywd committed Oct 17, 2023
1 parent 588908c commit 8117ed0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/environments/defaultEnvironments.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ func callApiEE(goPayload types.WorkloadClusterSet) error {

req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/api/v1", KubefirstApiEe), bytes.NewReader(payload))
if err != nil {
log.Errorf("error creating request %s", err)
log.Errorf("error creating http request %s", err)
return err
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")

res, err := httpClient.Do(req)
if err != nil {
log.Errorf("error calling api ee %s", err)
log.Errorf("error in http call to api ee %s", err)
return err
}

if res.StatusCode != http.StatusOK {
log.Errorf("unable to create default workload clusters and default environments %s", res.Status)
log.Errorf("unable to create default workload clusters and default environments %s: \n request: %s", res.Status, res.Request.URL)
return err
}

Expand Down

0 comments on commit 8117ed0

Please sign in to comment.