mirror of
https://github.com/Alvin-Zilverstand/novatorem.git
synced 2026-03-06 11:07:09 +01:00
Debugging KeyError
This commit is contained in:
@@ -38,9 +38,14 @@ def refreshToken():
|
|||||||
}
|
}
|
||||||
|
|
||||||
headers = {"Authorization": "Basic {}".format(getAuth())}
|
headers = {"Authorization": "Basic {}".format(getAuth())}
|
||||||
|
|
||||||
response = requests.post(REFRESH_TOKEN_URL, data=data, headers=headers)
|
response = requests.post(REFRESH_TOKEN_URL, data=data, headers=headers)
|
||||||
return response.json()["access_token"]
|
|
||||||
|
try:
|
||||||
|
return response.json()["access_token"]
|
||||||
|
except KeyError:
|
||||||
|
print(json.dumps(response.json()))
|
||||||
|
print("\n---\n")
|
||||||
|
raise KeyError(str(response.json()))
|
||||||
|
|
||||||
|
|
||||||
def recentlyPlayed():
|
def recentlyPlayed():
|
||||||
|
|||||||
Reference in New Issue
Block a user