Discussions
PATCH on recurring tasks returns `should_not_edit_task`
last month by Ralf Zosel
I'm using the Daylite API to add keywords to tasks via PATCH. This works fine for regular tasks, but fails with a 400 error on recurring tasks.
Steps to reproduce
- GET a recurring task — works fine, returns 200:
GET https://api.marketcircle.net/v1/tasks/{id} -> 200
Response includes e.g. "keywords": ["keyword-A", "keyword-B"]
- PATCH the same task to add a keyword:
PATCH https://api.marketcircle.net/v1/tasks/{id}
Content-Type: application/json
{"keywords": ["keyword-A", "keyword-B", "keyword-C"]}
Response: 400
{"base":[{"error":"should_not_edit_task"}]}
- The exact same PATCH logic works without issues on non-recurring tasks.
Observations
- The only difference I could identify is that the failing tasks are recurring tasks in Daylite.
- The GET response does not include any field indicating that a task is recurring, so there is no way to detect this situation beforehand via the API.
- The error message
should_not_edit_taskis not documented in the HTTP Status Codes section or anywhere else in the API reference. I also searched the internet and the Discussions forum but found no mentions of this error or any information about recurring task limitations in the API.
Questions
- Is editing recurring tasks via the API intentionally blocked? If so – why? – and could this be documented (ideally in the Task PATCH section)?
- If it is intentional — is there a workaround to update keywords on recurring tasks via the API?
- Could the GET response for tasks include a field (e.g.
"recurring": true) so that API consumers can handle this case gracefully?
Thanks for your help!