ForumsDevelopersAdding Tasks with Ref & Errors


Adding Tasks with Ref & Errors
Author Message
haemoglobin

Posted: Feb 16, 2013
Score: 0 Reference
Hi,

I seem to have found a potential bug with the add tasks API with regards to the "ref" parameter and an error condition.

The docs say that this parameter is alphanumeric (http://api.toodledo.com/2/tasks/index.php) however this is what I see returned if an error happens:

Post: tasks=[{"ref":"123","note":"hi"}]
Response: [{"errorCode":5,"errorDesc":"No title","ref":"123"}]
This is correct.

However if I use a letter in the reference, I get 0 back in the echoed ref parameter:
Post: tasks=[{"ref":"abc","note":"hi"}]
Response: [{"errorCode":5,"errorDesc":"No title","ref":0}]

Note that however if there is no error, i.e if I did add a title, then the references comes back fine:
Post: tasks=[{"ref":"abc","note":"hi","title":"the title"}]
Response: [{"id":"80749485","title":"the title","modified":1361029585,"completed":0,"ref":"abc"}]

Since I am using guids for references which have alphanumeric characters, it means it is difficult to map back any errors to the appropriate task.

Thanks,
Hamish
Jake

Toodledo Founder
Posted: Feb 18, 2013
Score: 0 Reference
Thanks for reporting this bug. I have identified the place where the alphanumeric string is incorrectly getting forced to be a numeric string when an error is being reported. I will get this fixed.
haemoglobin

Posted: Feb 20, 2013
Score: 0 Reference
Thanks, if you could let me know once it's done that will be great (so that I can switch back to guids etc).
Jake

Toodledo Founder
Posted: Feb 20, 2013
Score: 0 Reference
It is fixed
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.