(cherry picked from commit 87004cc22d)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
44bdccbfd1
commit
457c110b26
@@ -235,7 +235,8 @@ func (hs *HTTPServer) DeleteDataSourceByName(c *models.ReqContext) response.Resp
|
||||
|
||||
func validateURL(cmdType string, url string) response.Response {
|
||||
if _, err := datasource.ValidateURL(cmdType, url); err != nil {
|
||||
return response.Error(400, fmt.Sprintf("Validation error, invalid URL: %q", url), err)
|
||||
datasourcesLogger.Error("Failed to validate URL", "url", url)
|
||||
return response.Error(http.StatusBadRequest, "Validation error, invalid URL", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user