Merge pull request #1858 from erikmiller-gusto/main

fix: datadog metrics should provide http status code on error if non-2xx response
This commit is contained in:
Stefan Prodan
2025-12-18 09:09:51 +02:00
committed by GitHub

View File

@@ -131,7 +131,7 @@ func (p *DatadogProvider) RunQuery(query string) (float64, error) {
}
if r.StatusCode != http.StatusOK {
return 0, fmt.Errorf("error response: %s: %w", string(b), err)
return 0, fmt.Errorf("error response: %s: %s", string(b), r.Status)
}
var res datadogResponse