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

Most upvoted comments

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.