mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore(influx): no point of reading response when bad status (#16212)
There's no point in reading the body response without using the result so removing it. Fixes #9199 Ref #16207
This commit is contained in:
committed by
GitHub
parent
fda7e686f3
commit
6b8e3122f8
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
@@ -73,7 +72,6 @@ func (e *InfluxDBExecutor) Query(ctx context.Context, dsInfo *models.DataSource,
|
||||
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode/100 != 2 {
|
||||
ioutil.ReadAll(resp.Body)
|
||||
return nil, fmt.Errorf("Influxdb returned statuscode invalid status code: %v", resp.Status)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user