Query error message, nice to have #72

Closed
nicktacular opened this Issue Jan 9, 2013 · 6 comments

Comments

Projects
None yet
2 participants
@nicktacular

If you make a mistake in your query that's still valid JSON but it's not valid Mongo query syntax, it would be nice to get an error instead of thinking you're waiting a long time for data. For example, the following is invalid but a tired coder may not notice:

{Status:{$neq:"Published"}}

It would be nice to send back a message saying it's invalid syntax.

(What I really meant was {Status:{$ne:"Published"}}).

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 10, 2013

Owner

Agreed. In fact, it is giving you a useful message, you just can't see it :)

{"error":"exception: invalid operator: $neq","status":400}
Owner

bobthecow commented Jan 10, 2013

Agreed. In fact, it is giving you a useful message, you just can't see it :)

{"error":"exception: invalid operator: $neq","status":400}
@nicktacular

This comment has been minimized.

Show comment
Hide comment
@nicktacular

nicktacular Jan 10, 2013

Cool! I'll run it with Firebug moving forward :)

Cool! I'll run it with Firebug moving forward :)

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 10, 2013

Owner

No, I'll fix it. I just haven't gotten around to handling all of these cases yet :P

Owner

bobthecow commented Jan 10, 2013

No, I'll fix it. I just haven't gotten around to handling all of these cases yet :P

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 18, 2013

Owner

This has been fixed in develop, and it'll go out in the next release. Thanks for reporting it :)

Owner

bobthecow commented Jan 18, 2013

This has been fixed in develop, and it'll go out in the next release. Thanks for reporting it :)

@bobthecow bobthecow closed this Jan 18, 2013

bobthecow added a commit that referenced this issue Feb 11, 2013

Surface more server error messages.
… including warning about invalid operators in search.

Fixes #72
@nicktacular

This comment has been minimized.

Show comment
Hide comment

Thank you!

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 11, 2013

Owner

No problem.

Owner

bobthecow commented Feb 11, 2013

No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment