: This client uses a simple user-agent that requires JSON-syntax while parsing 
: searchresults from solr, but when solr drops an exception, tomcat returns an 
: error-500 page to the client and it crashes. 

define "crashes" ? ... presumabl you are tlaking about the client crashing 
because it can't parse theerro response, correct? ... the best suggestion 
given the current state of Solr is to make hte client smart enough to not 
attempt parsing of hte response unless the response code is 200.

: I was wondering if theres already a way to prepare exceptions as 
error-reports 
: and integrate them into the search-result as a hint to the user? If it would 
: be just another element of the whole response-format, it would be possibly 
: compatible with any client out there. 

It's one of the oldest out standing "improvements" in the Solr issue 
tracker, but it hasn't gotten much love over the years...

        https://issues.apache.org/jira/browse/SOLR-141

One possible workarround if you are comfortable with Java andif you are 
willing to always get the erros in a single response format (ie: JSON)...
 
you can customize the solr.war to specify an "error jsp" that your serlvet 
container will use to format all error responses.  you can make that JSP 
extract the error message from the Exception and output it in JSON format.



-Hoss

Reply via email to