From dfa2f3d2fbd04c5cd5e88fefbd13baaf25e566a2 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Fri, 15 Nov 2019 17:14:53 +0100 Subject: [PATCH] Chore: Log actual error when oauth pass thru fails (#20419) Logs the actual error when failing to retreive access token when OAuth pass true is enabled for a datasource. Ref: #20407 --- pkg/api/pluginproxy/ds_proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/pluginproxy/ds_proxy.go b/pkg/api/pluginproxy/ds_proxy.go index 91058d4ea27..6eedace09e1 100644 --- a/pkg/api/pluginproxy/ds_proxy.go +++ b/pkg/api/pluginproxy/ds_proxy.go @@ -322,7 +322,7 @@ func addOAuthPassThruAuth(c *m.ReqContext, req *http.Request) { TokenType: authInfoQuery.Result.OAuthTokenType, }).Token() if err != nil { - logger.Error("Failed to retrieve access token from oauth provider", "provider", authInfoQuery.Result.AuthModule) + logger.Error("Failed to retrieve access token from oauth provider", "provider", authInfoQuery.Result.AuthModule, "error", err) return }