Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data Conflict 409 Error

Tags:

couchdb

I am getting a Document Conflict 409 error when I try to add a document to CouchDB. The scenario is as follows.

  1. Add Doc1 Rev1 to Couch using HTTP PUT
  2. Delete Doc1 Rev1 from Couch using HTTP DELETE
  3. Add Doc1 Rev2 to Couch using HTTP PUT

Why would step 3 cause Couch to return a Data Conflict 409 error? How can a document be in conflict with a deleted document? Any insight would be greatly appreciated.

Jim

like image 591
JimZ Avatar asked Oct 29 '25 14:10

JimZ


1 Answers

This is by design. To create a document, don't pass a _rev value in the body.

like image 132
Robert Newson Avatar answered Oct 31 '25 11:10

Robert Newson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!