Skip to content

Commit 08f04aa

Browse files
chore: remove stale log (#178)
1 parent 74fdc67 commit 08f04aa

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

command/report/query.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ func makeQuery(url string, body []byte, bodyMimeType string) ([]byte, error) {
3434
}
3535

3636
if res.StatusCode >= http.StatusInternalServerError || res.StatusCode != 200 {
37-
// Log the response body.
3837
if resBody != nil {
39-
fmt.Println(string(resBody))
38+
return resBody, fmt.Errorf("Server responded with %s: %s", strconv.Itoa(res.StatusCode), string(resBody))
4039
}
41-
42-
return resBody, fmt.Errorf("Error making the query with HTTP status code: %s and message: %s", strconv.Itoa(res.StatusCode), string(resBody))
40+
return resBody, fmt.Errorf("Server responded with %s", strconv.Itoa(res.StatusCode))
4341
}
4442

4543
return resBody, nil

0 commit comments

Comments
 (0)