-
Notifications
You must be signed in to change notification settings - Fork 1
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
Indicate to the user when the query syntax is incorrect #111
Comments
Is there an indicator of incorrect query syntax in the output? Bad filters return 400s but was able to only get 500s related to PavlidisLab/Gemma#1225 when testing for bad queries |
Bad queries are usually escaped, so there's no error surfacing to the user. For 500, these are bugs. |
Then doing this on Gembrow side will need a specification for what is allowable in the query. Where would that be? |
I'm thinking of adding some warnings in the payload that GemBrow can then parse. data: [...]
query: '"test'
warnings:
- message: 'Invalid query syntax: quote is not closed, query was parsed as \"test.'
for: query I think it can be generalized whenever we notice something wrong with the request, but not bad enough to produce an HTTP error. |
Of note currently query being " " results in a 400. If all other invalid queries will return a warning, this might join those too |
Yay! It's done! PavlidisLab/Gemma@f3aafa7 |
The backend behaviour when we encounter such queries is to perform it with Lucene's reserved characters escaped.
It would be good to have some feedback in the endpoints that accept a query parameter that the browser can then display.
The text was updated successfully, but these errors were encountered: