No error on bad note sync and task fails to be created
aricooperman opened this issue · comments
Every time I try to sync a specific file that has uploaded successfully via api.commit() I get this error:
todoist.api.SyncError: ('b8a5bb94-3a7e-11ec-ac5a-448500173a18', {'error': 'Invalid temporary id', 'error_code': 16, 'error_extra': {}, 'error_tag': 'INVALID_TEMPID', 'http_code': 400})
Other files have no issue. This file is just a PNG and it uploads fine and when I add to a note and sync it fails repeatedly. I can't see how this has anything to do with the file since it is generating a UUID every time or why this UUID is considered invalid
So it turns out this is not an issue with the file note attachment and the error is because the task is never created because a previous note added. I found out that before adding the file, right after the task is created, but before syncing, I added a note that was too long (> 15,000 characters. However, there is no sync error and it looks like the task is created. However when I check Todoist it is not there. This happens even when I don't attempt the file upload and everything syncs and looks like it is successful. So I think the issue here is the lack of error when syncing with a note that is bad.
Confirmed, if I truncate the comment to 15,000 characters then the task gets created on the next sync and I can add the file attachment notes as well so looks like we are not getting a proper raised error when syncing a bad note