Closed doismellburning closed 12 years ago
From http://tempo-db.com/docs/api/series/:
Keys must be unique. If requesting a key that already exists, a 400 Bad Request will be returned.
I don't believe this is the correct behaviour. First, 400 indicates a syntactically incorrect request; the request is syntactically fine but has semantic issues.
My REST-fu is weak, but I suspect the correct behaviour (having gone through http://viswaug.files.wordpress.com/2008/11/http-headers-status1.png a few times) is likely to be a 409 Conflict or 412 Precondition Failed
This pull request should probably be considered incomplete as it doesn't make any attempt to handle failures in creation, but it's a start...! :)
Ping?
Thanks for the pull request! I think you are correct with the 409 Conflict/Duplicate. We are close to a release on the server-side. I'll make sure the 409 makes it in and then I can update the clients.
Also, apparently the email notifications were turned off for this repo. I apologize for not getting back to you earlier. This should be fixed going forward.
Excellent, cheers
Thanks for the pull request! I merged the code changes. The latest server release also returns a 409 if there is a conflict. The client still needs to be updated to reflect this.
Excellent, thanks
Note this method doesn't handle the 400 returned if there is a key collision; I'm not quite sure of the best way to handle this