logging in polar get_token
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user