mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Datasources: Handle URL parsing error (#25742)
Adds handling of error returned from URL parsing. Fixes #25714
This commit is contained in:
committed by
GitHub
parent
c16890c22d
commit
58cefe73ee
@@ -656,7 +656,10 @@ func calcBucketBound(bucketOptions stackdriverBucketOptions, n int) string {
|
||||
}
|
||||
|
||||
func (e *StackdriverExecutor) createRequest(ctx context.Context, dsInfo *models.DataSource, query *stackdriverQuery, proxyPass string) (*http.Request, error) {
|
||||
u, _ := url.Parse(dsInfo.Url)
|
||||
u, err := url.Parse(dsInfo.Url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
u.Path = path.Join(u.Path, "render")
|
||||
|
||||
req, err := http.NewRequest(http.MethodGet, "https://monitoring.googleapis.com/", nil)
|
||||
|
||||
Reference in New Issue
Block a user