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
@@ -79,7 +79,10 @@ func (e *OpenTsdbExecutor) Query(ctx context.Context, dsInfo *models.DataSource,
|
||||
}
|
||||
|
||||
func (e *OpenTsdbExecutor) createRequest(dsInfo *models.DataSource, data OpenTsdbQuery) (*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, "api/query")
|
||||
|
||||
postData, err := json.Marshal(data)
|
||||
|
||||
Reference in New Issue
Block a user