Azure Monitor: Propagate the error when failed to get datasource instance (#60210)

Propagate the error when failed to get instance
pull/59949/head
ms-hujia 3 years ago committed by GitHub
parent b4e76e75b1
commit 5010765115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go

@ -71,7 +71,7 @@ func (s *Service) getDataSourceFromHTTPReq(req *http.Request) (types.DatasourceI
pluginContext := httpadapter.PluginConfigFromContext(ctx)
i, err := s.im.Get(pluginContext)
if err != nil {
return types.DatasourceInfo{}, nil
return types.DatasourceInfo{}, err
}
ds, ok := i.(types.DatasourceInfo)
if !ok {

Loading…
Cancel
Save