Add more error handling to Agora API calls

This commit is contained in:
Mark Veidemanis 2022-01-06 12:33:06 +00:00
parent 23a30ebb86
commit 71389f7ff9
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ class Agora(object):
"""
Calls hooks to parse dashboard info and get all contact messages.
"""
dash = self.agora.dashboard_seller()
try:
dash = self.agora.dashboard_seller()
except ReadTimeout:
return False
dash_tmp = {}
if "data" not in dash["response"].keys():
self.log.error("Data not in dashboard response: {content}", content=dash)