Final preparations for v2.0

dev^2
Hoffelhas 2023-01-15 16:38:34 +01:00
parent 8fe99f4942
commit 956f5176af
1 changed files with 5 additions and 2 deletions

View File

@ -444,8 +444,11 @@ def initialise_sync_api(api):
}
data = 'sync_token=*&resource_types=["all"]'
response = requests.post(
'https://api.todoist.com/sync/v9/sync', headers=headers, data=data)
try:
response = requests.post(
'https://api.todoist.com/sync/v9/sync', headers=headers, data=data)
except Exception as e:
logging.error(f"Error during initialise_sync_api: '{e}'")
return json.loads(response.text)