fix: try to get any info from resp
All checks were successful
Build Docker / Build Docker (push) Successful in 28s

This commit is contained in:
Nathan Woodburn 2024-06-20 12:51:41 +10:00
parent 2a2d9e1a98
commit 770f20773b
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -523,7 +523,14 @@ def authUser():
def issue_token():
try:
resp = authorization.create_token_response()
print(resp.text,flush=True)
if hasattr(resp, 'json'):
print(resp.json(), flush=True)
elif hasattr(resp, 'content'):
print(resp.content, flush=True)
elif hasattr(resp, 'data'):
print(resp.data, flush=True)
else:
print("Unknown response structure:", resp)
return resp
except OAuth2Error as error:
print(json.dumps({