From e4bbcc447dc6bce844914d40ebf61d887b066158 Mon Sep 17 00:00:00 2001 From: David Bennett <71459415+Jagularr@users.noreply.github.com> Date: Thu, 25 Mar 2021 09:20:41 -0400 Subject: [PATCH] Handle error when initializing the auth object in Azure Monitor output plugin. (#9048) --- plugins/outputs/azure_monitor/azure_monitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/outputs/azure_monitor/azure_monitor.go b/plugins/outputs/azure_monitor/azure_monitor.go index 2bf1d2899fb9b..c295b553f963a 100644 --- a/plugins/outputs/azure_monitor/azure_monitor.go +++ b/plugins/outputs/azure_monitor/azure_monitor.go @@ -193,7 +193,7 @@ func (a *AzureMonitor) Connect() error { a.auth, err = auth.NewAuthorizerFromEnvironmentWithResource(defaultAuthResource) if err != nil { - return nil + return err } a.Reset()