pouchdb: 409 conflict when following API documentation for document removal
var pouch = new PouchDB('test_db');
pouch.post({blah: 1}, function (err, resp) {
pouch.get(resp.id, function (err, doc) {
pouch.remove(doc._id, doc._rev, function (err) {
dump(err);
});
});
});
gives output:
PouchError{status: 409, name: 'conflict', message: 'Document update conflict', error: true}
Why would there be a conflict when I have the latest revision? Note that this is following http://pouchdb.com/api.html#delete_document
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- (#2573) - test for remove doc — committed to pouchdb/pouchdb by calvinmetcalf 10 years ago
Yeah, it’s generally good practice to never ever ever modify the global prototype. That library should be renamed from useful.js to harmful.js.