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

Better error messages on invalid index #146

Closed
natew opened this issue Apr 26, 2017 · 1 comment
Closed

Better error messages on invalid index #146

natew opened this issue Apr 26, 2017 · 1 comment

Comments

@natew
Copy link
Contributor

natew commented Apr 26, 2017

When you attempt to query using an index that doesn't exist you get an error like this:

Cannot read property 'type' of undefined

Because I'm using RxDB + Mobx it's doubly confusing as mobx catches it and displays:

image

Which is really hard to parse. Any chance we could make the errors here a bit nicer, including some information on the query and whats wrong with it? Ideally:

Could not compile query $('users').find().sort({ created: 'desc' }):
   The sort field "created" is not a field in the schema!
@pubkey
Copy link
Owner

pubkey commented May 22, 2017

@natew Can you paste some code to easy reproduce the error?
I not quite sure if I understood where the error-message can be improved.

@pubkey pubkey closed this as completed in 1002b3f Jun 3, 2017
pubkey added a commit that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants