Azure Monitor/body close logs an error bug (#74632)
on body close causes logs an error even if no error. also changed to warning similar to the rest of grafana
This commit is contained in:
@@ -393,8 +393,9 @@ func parseSubscriptions(res *http.Response) ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
err := res.Body.Close()
|
||||
backend.Logger.Error("Failed to close response body", "err", err)
|
||||
if err := res.Body.Close(); err != nil {
|
||||
backend.Logger.Warn("Failed to close response body", "err", err)
|
||||
}
|
||||
}()
|
||||
|
||||
result := make([]string, len(target.Value))
|
||||
|
||||
Reference in New Issue
Block a user