couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Slight inconsistency in the wiki information—409 vs. 412 response
Date Thu, 05 Mar 2009 21:54:39 GMT
Rob,

The return codes from trying to create an already existing DB and
trying to update a doc with no or an incorrect _rev were once what's
in the wiki. IIRC, someone brought it up and it was decided that
should be swapped. Feel free to correct the wiki.

HTH,
Paul Davis

On Thu, Mar 5, 2009 at 4:14 PM, Robert Schonberger
<rschonberger@gmail.com> wrote:
> Hi all,i'm reading through the couchdb wiki, and looking at
> http://wiki.apache.org/couchdb/HTTP_Document_API
>
> notably, in the section about uploading documents via PUT, there is a
> comment:
> To update an existing document, you also issue a *PUT* request. In this
> case, the JSON body must contain a *_rev* property, which lets CouchDB know
> which revision the edits are based on. If the revision of the document
> currently stored in the database doesn't match, then a *409* conflict error
> is returned.
>
> and looking at the response example :
>
> HTTP/1.1 412 Precondition Failed
> Date: Thu, 17 Aug 2006 05:39:28 +0000GMT
> Content-Length: 33
> Connection: close
>
> {"error":"conflict","reason":"Document update conflict."}
>
> I'm just wondering which of the 2 of 409 or 412 it is. I don't think it's
> supremely important, just something I noticed!
>
> (First post to user@)
> Rob
>
> --
> Robert Schonberger
> rschonberger@gmail.com
>

Mime
View raw message