mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
fix: datadog metrics should provide http status code on error if non-2xx response
currently the log line exposes the error, however that's always going to be nil based on the check just above it. This provides better visibility into the failure reason Signed-off-by: Erik Miller <erik.miller@gusto.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user