Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateOrAdd could throw more meaningful error when there is no id #115

Open
rmehner opened this issue Sep 2, 2016 · 1 comment
Open
Labels

Comments

@rmehner
Copy link

rmehner commented Sep 2, 2016

So we've been using Hoodie in a project like this:

hoodie.store.updateOrAdd({artist: 'Shellac', title: 'Riding Bikes'})

and ran into the following Pouch error which left us a bit baffled for the moment:

pouch-error

Quickly looking up into the code it was clear what happens, but then I was confused because in hoodie-store-client there's code that handles that case and returns a more friendly error message: https://github.com/hoodiehq/hoodie-store-client/blob/e850a59e6e9b5266866b0f9ca1a0f703ce55aa60/lib/scoped/update-or-add.js#L28-L32

Should pouchdb-hoodie-api behave the same?

@gr2m
Copy link
Member

gr2m commented Sep 2, 2016

yes, I’m already working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants