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

Report syntax error when search query contains unescaped slash #2450

Merged
merged 2 commits into from Jul 11, 2016

Conversation

Projects
None yet
3 participants
@edmundoa
Member

edmundoa commented Jul 4, 2016

When a search query contains an unescaped slash, calling to queryParser.generateParseException() throws a NullPointerException, so the REST API returns a 500 error instead of 400.

Fixes #2372

@edmundoa edmundoa added this to the 2.1.0 milestone Jul 4, 2016

Report syntax error if search query contains slash
When the search query contains an unescaped slash, calling to
`generateParseException()` throws a NullPointerException. We solve it by
catching the exception and let the normal program flow to continue, which
at that point will return the syntax error.

Fixes #2372

@edmundoa edmundoa force-pushed the issue-2372 branch from fb4fcd7 to 453c391 Jul 4, 2016

@bernd bernd self-assigned this Jul 4, 2016

@joschi joschi assigned joschi and unassigned bernd Jul 11, 2016

@joschi

This comment has been minimized.

Contributor

joschi commented Jul 11, 2016

LGTM. 👍

@joschi joschi merged commit 9219da1 into master Jul 11, 2016

0 of 4 checks passed

ci-server-integration Jenkins build is being scheduled
Details
ci-web-linter Jenkins build is being scheduled
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@joschi joschi deleted the issue-2372 branch Jul 11, 2016

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