Legend

Forum

Unread topics or posts

Topic

Unread posts

Locked

Announcement

Forums > Developers

Adding Tasks with Ref & Errors



AuthorMessage
haemoglobin

Posted: Feb 16, 2013
Score: 0



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 Admin
Posted: Feb 18, 2013
Score: 0



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



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 Admin
Posted: Feb 20, 2013
Score: 0



It is fixed
You cannot reply yet


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



Toodledo Forums > Developers