Add more error handling to Agora API calls

This commit is contained in:
Mark Veidemanis 2022-01-06 12:33:06 +00:00
parent f6da15decd
commit b0c401f36f
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. Calls hooks to parse dashboard info and get all contact messages.
""" """
try:
dash = self.agora.dashboard_seller() dash = self.agora.dashboard_seller()
except ReadTimeout:
return False
dash_tmp = {} dash_tmp = {}
if "data" not in dash["response"].keys(): if "data" not in dash["response"].keys():
self.log.error("Data not in dashboard response: {content}", content=dash) self.log.error("Data not in dashboard response: {content}", content=dash)