From 501076511595e61207fd5cc41014ac98406f3446 Mon Sep 17 00:00:00 2001 From: ms-hujia <48512395+ms-hujia@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:36:41 +0800 Subject: [PATCH] Azure Monitor: Propagate the error when failed to get datasource instance (#60210) Propagate the error when failed to get instance --- pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go b/pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go index 674928c9391..b7fd71b5796 100644 --- a/pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go +++ b/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 {