Skip to content

Commit 7788758

Browse files
committed
fix: incident creation and resolution
1 parent 6fb9961 commit 7788758

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

main.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"encoding/json"
55
"flag"
66
"fmt"
7-
"io"
87
"net/http"
98
"os"
109
"path/filepath"
@@ -228,20 +227,9 @@ func (s *SystemMonitor) sendMetric(metric Metric) error {
228227
}
229228
defer resp.Body.Close()
230229

231-
// Read response body
232-
respBody, err := io.ReadAll(resp.Body)
233-
if err != nil {
234-
return fmt.Errorf("failed to read response body: %v", err)
235-
}
236-
237-
// Log response details without colors
238230
s.log.Log("Response Status: %s", resp.Status)
239-
if len(respBody) > 0 {
240-
s.log.Log("Response Body: %s", string(respBody))
241-
}
242-
243231
if resp.StatusCode >= 400 {
244-
return fmt.Errorf("request failed with status: %d, body: %s", resp.StatusCode, string(respBody))
232+
return fmt.Errorf("request failed with status: %d", resp.StatusCode)
245233
}
246234

247235
return nil

0 commit comments

Comments
 (0)