Skip to content

Commit

Permalink
fix: adding helpful logs
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Sep 1, 2023
1 parent 029fc2a commit 2ae8c58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ func RunOpsWorkflow() (WorkflowHealth, error) {
}
}

log.Printf("[DEBUG] Execution Result Status: %#v", executionResults.Status)
log.Printf("[DEBUG] Workflow Health execution Result Status: %#v", executionResults.Status)
}

// 4. Delete workflow
Expand Down Expand Up @@ -770,7 +770,7 @@ func InitOpsWorkflow() error {
// Send the HTTP request using the default HTTP client
resp, err := http.DefaultClient.Do(req)
if err != nil {
fmt.Println("[ERROR] sending HTTP request:", err)
fmt.Println("[ERROR] sending Ops fetch app HTTP request:", err)
return errors.New("Error sending HTTP request: " + err.Error())
}

Expand All @@ -780,14 +780,14 @@ func InitOpsWorkflow() error {
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("[ERROR] reading HTTP response body:", err)
return errors.New("Error reading HTTP response body: " + err.Error())
return errors.New("Error reading HTTP App response response body: " + err.Error())
}

// Unmarshal the JSON data into a Workflow instance
var workflowData Workflow
err = json.Unmarshal(body, &workflowData)
if err != nil {
fmt.Println("[ERROR] unmarshalling JSON data:", err)
fmt.Println("[ERROR] unmarshalling Ops workflowData JSON data:", err)
return errors.New("Error unmarshalling JSON data: " + err.Error())
}

Expand Down

0 comments on commit 2ae8c58

Please sign in to comment.