Handle 409 conflict document in couchdb

Problem Use case:

 CouchDB Error 409 conflict document.

Exception Details [Truncated]:
CouchDB is throwing error 409 conflict while calling REST API to update data.
CouchDB will throw 409 conflict document exception if the payload is not proper. Following are some of the cases.
"_id" : This attribute is present, but the "_rev" attribute is not present or is wrong.
CouchDB uses both the "_id" and "_rev" attribute while updating a Document. Every time we update a document the "_rev" attribute value gets updated.

Solution:
If we want to update data, then make sure both "_id" and "_rev" attributes are carrying proper values respectively.


Referance Links related to CouchDB:
https://webdevpedia.blogspot.com/2019/07/installing-couchdb-on-gcp-compute-engine.html

Comments

Popular posts from this blog

Converting Java Map to String

Difference between volatile and synchronized

Invoking EJB deployed on a remote machine