alanvardy / tod

An unofficial Todoist command line client written in Rust
MIT License
104 stars 9 forks source link

Project Empty treats failed POST as Success when destination project full #863

Closed stacksjb closed 4 weeks ago

stacksjb commented 2 months ago

I recently used "tod project empty -p Inbox" and had 7 tasks left that were still in my Inbox. Re-running returns a successful response each time, but the tasks remain. I ran in verbose/debug log and found the response codes appear to not be respected correctly.

Task attempt to move returns this response :

POST /sync/v9/sync response: {"full_sync":true,"sync_status":{"04c08bac-beb9-47d3-9077-2d167fb4d9e6":{"error":"Maximum number of items per user project limit reached","error_code":49,"error_extra":{},"error_tag":"MAX_ITEMS_LIMIT_REACHED","http_code":403}},"sync_token":"xxx","temp_id_mapping":{}} `

However it does move on successfully to the next one.

alanvardy commented 4 weeks ago

Awesome, thank you for this. I have reproduced, and it will now spit out an error when there is an error under sync_status

image

Will be in next release.

alanvardy commented 4 weeks ago

Addressing in this PR: https://github.com/alanvardy/tod/pull/880