sources/oauth: log body when get_profile fails
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
025fc3fe96
commit
c57fbcfd89
|
@ -44,7 +44,7 @@ class BaseOAuthClient:
|
|||
response = self.do_request("get", profile_url, token=token)
|
||||
response.raise_for_status()
|
||||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc)
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
|
|
@ -37,7 +37,7 @@ class AzureADClient(OAuth2Client):
|
|||
)
|
||||
response.raise_for_status()
|
||||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc)
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
|
|
@ -36,7 +36,7 @@ class MailcowOAuth2Client(OAuth2Client):
|
|||
)
|
||||
response.raise_for_status()
|
||||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc)
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
|
Reference in New Issue