Private
Public Access
1
0

logging in polar get_token

This commit is contained in:
Sander Roosendaal
2022-01-19 10:39:11 +01:00
parent 0df0ed1564
commit af4f97c756
2 changed files with 7 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ import base64
import yaml
from uuid import uuid4
from requests import ConnectionError
from json.decoder import JSONDecodeError
# Django
from django.http import HttpResponseRedirect, HttpResponse,JsonResponse
@@ -98,7 +99,9 @@ def get_token(code):
thetoken = token_json['access_token']
expires_in = token_json['expires_in']
user_id = token_json['x_user_id']
except (KeyError,JSONDecodeError):
except (KeyError,JSONDecodeError) as e:
dologging('polar.log',e)
dologging('polar.log',response.text)
thetoken = 0
expires_in = 0
user_id = 0