Merge branch 'master' of github.com:grafana/grafana

This commit is contained in:
Torkel Ödegaard
2016-09-28 08:09:51 +02:00
21 changed files with 202 additions and 47 deletions
+4 -4
View File
@@ -38,7 +38,7 @@ func init() {
}
HttpClient = http.Client{
Timeout: time.Duration(10 * time.Second),
Timeout: time.Duration(15 * time.Second),
Transport: tr,
}
}
@@ -102,9 +102,9 @@ func (e *GraphiteExecutor) parseResponse(res *http.Response) ([]TargetResponseDT
return nil, err
}
if res.StatusCode == http.StatusUnauthorized {
glog.Info("Request is Unauthorized", "status", res.Status, "body", string(body))
return nil, fmt.Errorf("Request is Unauthorized status: %v body: %s", res.Status, string(body))
if res.StatusCode/100 != 2 {
glog.Info("Request failed", "status", res.Status, "body", string(body))
return nil, fmt.Errorf("Request failed status: %v", res.Status)
}
var data []TargetResponseDTO