-
Notifications
You must be signed in to change notification settings - Fork 7
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
Validation errors are not consistent for local and remote databases. #4
Comments
Nice find. Hmm, is |
@marten-de-vries that is a bug. |
Might be a rather nasty breaking change to PouchDB to alter the error fields as there is sure to be tons of code that depends on it ... what do you think? I needed consistency so that I can write an app that switches data source to be: remote, local (live sync on/off) and db API is consistent. I'm also fetching ddocs from server. |
@tohagan Any reason why you can't just use |
I just ported over the old pouchdb-validation test suite, seems like this is indeed a PouchDB bug. And that it's not as easy to circumvent as I assumed in my last post. Going to open a PouchDB bug. |
As soon as pouchdb/pouchdb#4670 is fixed, the test I mentioned in that bug can be re-enabled and then we can close this. |
Thanks for all your test suite porting and chasing this issue Marten. Really appreciated. |
@marten-de-vries looks like the linked ticket (which was a dupe of pouchdb/pouchdb#5214) has now been fixed. |
That should solve this issue without further work being required. Before closing though, I think this test (well, the equivalent in the latest master branch) should be re-enabled, so we can be sure: https://github.com/pouchdb/pouchdb-validation/pull/5/files#diff-fb0d18ca230e188e02029b32dbb851d8R28 |
From my project unit tests I've identified that in order to get identical errors returned from a local or remote database you need the following code change
message
field toreason
The text was updated successfully, but these errors were encountered: