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
pull/20422/head
Marcus Efraimsson 6 years ago committed by GitHub
parent e0a2d4beac
commit dfa2f3d2fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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
}

Loading…
Cancel
Save