diff --git a/pkg/api/datasources.go b/pkg/api/datasources.go index 8acd522c85c..3b9bd651e68 100644 --- a/pkg/api/datasources.go +++ b/pkg/api/datasources.go @@ -318,7 +318,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