log error on datasource access denied

This commit is contained in:
Marcus Efraimsson
2018-10-30 09:32:32 +01:00
parent 70ddf93688
commit 52d825f535
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ func (hs *HTTPServer) ProxyDataSourceRequest(c *m.ReqContext) {
ds, err := hs.DatasourceCache.GetDatasource(dsId, c.SignedInUser, c.SkipCache)
if err != nil {
if err == m.ErrDataSourceAccessDenied {
c.JsonApiErr(403, "Access denied to datasource", nil)
c.JsonApiErr(403, "Access denied to datasource", err)
return
}
c.JsonApiErr(500, "Unable to load datasource meta data", err)
+1 -1
View File
@@ -28,7 +28,7 @@ func (hs *HTTPServer) QueryMetrics(c *m.ReqContext, reqDto dtos.MetricRequest) R
ds, err := hs.DatasourceCache.GetDatasource(datasourceId, c.SignedInUser, c.SkipCache)
if err != nil {
if err == m.ErrDataSourceAccessDenied {
return Error(403, "Access denied to datasource", nil)
return Error(403, "Access denied to datasource", err)
}
return Error(500, "Unable to load datasource meta data", err)
}