Azure Monitor: Return query error for metrics (#62570)

This commit is contained in:
Andres Martinez Gotor 2023-01-31 13:28:35 +01:00 committed by GitHub
parent a46d62cf48
commit 13f8ea2656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ func (e *AzureMonitorDatasource) unmarshalResponse(logger log.Logger, res *http.
if res.StatusCode/100 != 2 {
logger.Debug("Request failed", "status", res.Status, "body", string(body))
return types.AzureMonitorResponse{}, fmt.Errorf("request failed, status: %s", res.Status)
return types.AzureMonitorResponse{}, fmt.Errorf("request failed, status: %s, error: %s", res.Status, string(body))
}
var data types.AzureMonitorResponse