Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

No error on bad note sync and task fails to be created #99

Open
aricooperman opened this issue Oct 31, 2021 · 2 comments
Open

No error on bad note sync and task fails to be created #99

aricooperman opened this issue Oct 31, 2021 · 2 comments

Comments

@aricooperman
Copy link

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

@aricooperman
Copy link
Author

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.

@aricooperman aricooperman changed the title 'Invalid temporary id' when uploading a file comment, adding to a note, and then syncing No error on bad note sync and task fails to be created Oct 31, 2021
@aricooperman
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant