Mbonea commited on
Commit
3c7058e
·
1 Parent(s): e23c4c3

try catch that shit

Browse files
Files changed (1) hide show
  1. App/Android/Android.py +4 -2
App/Android/Android.py CHANGED
@@ -53,8 +53,10 @@ class AndroidClient:
53
  async def is_user_active(self, phone_number):
54
  """Retrieve all active users."""
55
  response = await self.client.get("/users/active")
56
- data = response.json()
57
-
 
 
58
  if "active_users" in data:
59
  active_users = data["active_users"]
60
 
 
53
  async def is_user_active(self, phone_number):
54
  """Retrieve all active users."""
55
  response = await self.client.get("/users/active")
56
+ try:
57
+ data = response.json()
58
+ except:
59
+ return False
60
  if "active_users" in data:
61
  active_users = data["active_users"]
62