FIX: Added Error Handling

This commit is contained in:
Anmol
2020-07-21 13:04:21 +05:30
parent 95a5e7e9db
commit 1669e1805d

View File

@@ -161,6 +161,7 @@ def get_stats():
if request.status_code == 200: if request.status_code == 200:
data = request.json() data = request.json()
stats = stats + '📊 **This week I spent my time on** \n\n'
stats = stats + '```text\n' stats = stats + '```text\n'
if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']: if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']:
timezone = data['data']['timezone'] timezone = data['data']['timezone']