Skip to content

Commit 9090802

Browse files
authored
Merge pull request #1858 from erikmiller-gusto/main
fix: datadog metrics should provide http status code on error if non-2xx response
2 parents 3ce87af + ffddfd9 commit 9090802

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/metrics/providers/datadog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (p *DatadogProvider) RunQuery(query string) (float64, error) {
131131
}
132132

133133
if r.StatusCode != http.StatusOK {
134-
return 0, fmt.Errorf("error response: %s: %w", string(b), err)
134+
return 0, fmt.Errorf("error response: %s: %s", string(b), r.Status)
135135
}
136136

137137
var res datadogResponse

0 commit comments

Comments
 (0)