From 956f5176afcf6b882172f5cff695c48715da6f70 Mon Sep 17 00:00:00 2001 From: Hoffelhas Date: Sun, 15 Jan 2023 16:38:34 +0100 Subject: [PATCH] Final preparations for v2.0 --- autodoist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autodoist.py b/autodoist.py index 1f865d4..0801213 100644 --- a/autodoist.py +++ b/autodoist.py @@ -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)