mirror of
https://github.com/fluxcd/flagger.git
synced 2026-03-03 02:00:18 +00:00
Merge pull request #1878 from rohansood10/fix/1434-prometheus-error-messages
Include HTTP status code in Prometheus error responses
This commit is contained in:
@@ -143,7 +143,7 @@ func (p *PrometheusProvider) RunQuery(query string) (float64, error) {
|
||||
}
|
||||
|
||||
if 400 <= r.StatusCode {
|
||||
return 0, fmt.Errorf("error response: %s", string(b))
|
||||
return 0, fmt.Errorf("error response: Status %d %s: %s", r.StatusCode, http.StatusText(r.StatusCode), string(b))
|
||||
}
|
||||
|
||||
var result prometheusResponse
|
||||
|
||||
Reference in New Issue
Block a user