hoodie-plugin-tutorial icon indicating copy to clipboard operation
hoodie-plugin-tutorial copied to clipboard

Error: { error: 'conflict', reason: 'Document update conflict.' }

Open elmarburke opened this issue 12 years ago • 3 comments

I've got this error in the backend. After some debugging i found that the _id and _rev are still in the message object. i've put

delete message._id;
delete message._rev;

to index.js just before hoodie.database() and now it works well.

elmarburke avatar Nov 04 '13 23:11 elmarburke

could you check if delete message._rev; only is sufficient? It should. And we'd have the benefit that we could keep a relation between the "same" objects in the the sender's / recipient's database.

gr2m avatar Nov 05 '13 08:11 gr2m

nope, delete message._id is required. It looks you can only save on _id per couch. But you can drop delete message._rev even it is useless.

elmarburke avatar Nov 05 '13 13:11 elmarburke

I'd like to dive deeper into this, but won't be able to do so until end of November.

I'd suggest to merge the workaround by @elmarburke into the tutorial. Any objections @janl @svnlto @espy?

gr2m avatar Nov 06 '13 09:11 gr2m