Skip to content

Commit

Permalink
fix: improve error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
claywd committed Oct 17, 2023
1 parent 0d19dcd commit 607d0f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/environments/defaultEnvironments.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ 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 %s", err)
log.Errorf("error creating 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 %s", err)
log.Errorf("error calling api ee %s", err)
return err
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func main() {
go func() {
err := environments.CreateDefaultEnvironments(importedCluster)
if err != nil {
log.Fatal(err)
log.Fatalf("Error creating default environments %s", err.Error())
}
}()
}
Expand Down

0 comments on commit 607d0f6

Please sign in to comment.