Bug #9851

Handle SearchPhaseExecutionException exceptions gracefully

Added by Jesús García Crespo about 6 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:05/16/2016
Priority:MediumDue date:
Assignee:Sara Allain% Done:


Category:Search / BrowseEstimated time:1.00 hour
Target version:Release 2.3.0
Google Code Legacy ID: Tested version:2.2
Sponsored:No Requires documentation:


How to reproduce

1. Open http://demo.accesstomemory.org/
2. Type a double quotation mark (") in the search bar
3. Hit enter

You'll see a 500 error ("Oops! An Error Occurred"). Instead, we could show an error message warning about a problem in the inline exception, e.g. if it's a SearchParseException we could tell the user that the query may be malformed.


#1 Updated by Jesús García Crespo about 6 years ago

  • Status changed from New to QA/Review
  • Assignee changed from Jesús García Crespo to Mike Gale


Example when searching for quotation mark after the fix:

In debug mode more details will be shown. A good way to test is to make a search or browse when Elasticsearch is down (/etc/init.d/elasticsearch stop).

#2 Updated by Jesús García Crespo about 6 years ago

  • Assignee changed from Mike Gale to Dan Gillean

Hey Dan, best way to test this is to stop Elasticsearch and try to do a search, use one of the browser pages, etc...

I understand that showing the exception name (e.g. Elastica\Exception\ResponseException) is not the friendliest solution, but it's pretty good when reporting a problem to administrators or in the user forum. In debug mode, more details will be shown.

#3 Updated by Sara Allain almost 6 years ago

  • Status changed from QA/Review to Verified
  • Assignee changed from Dan Gillean to Sara Allain

Looks good! Showing the exception name works well enough, I think.

Also available in: Atom PDF