Closed csaroff closed 8 years ago
Right, the solution is to not use upsert
. By design, the goal of this repo is to just provide a handler for synchronized logic.
I'll also point out that it's a bit against the spirit of PouchDB (and "offline first") to try to do an HTTP request in order to update a local document.. but if you absolutely have to do it, then yes, I would say you should handle 409s and 404s yourself.
Understood. Thanks for the comment.
I would currently like to be able to make asynchronous requests from inside my diff function.
AFAIK, this is currently impossible from the diff function.
I can see two options that don't involve updating this library.
I used to do (1) and it makes the code look really ugly. (2) Introduces a pretty senseless inefficiency.
I think that the syntax I proposed above looks hideous, but do you have any suggestions or recommendations here?