Skip to content

Commit b10e7cf

Browse files
authored
Merge pull request #1878 from rohansood10/fix/1434-prometheus-error-messages
Include HTTP status code in Prometheus error responses
2 parents 6b7c86b + 6a00963 commit b10e7cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/metrics/providers/prometheus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (p *PrometheusProvider) RunQuery(query string) (float64, error) {
143143
}
144144

145145
if 400 <= r.StatusCode {
146-
return 0, fmt.Errorf("error response: %s", string(b))
146+
return 0, fmt.Errorf("error response: Status %d %s: %s", r.StatusCode, http.StatusText(r.StatusCode), string(b))
147147
}
148148

149149
var result prometheusResponse

0 commit comments

Comments
 (0)