Details
-
Wish
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Whenever possible, the Solr Dispatcher should to let the ResponseWriter format Exceptions using the format the user expects – this should in no way change the fact that Exceptions currently generate non 200 HTTP status codes, nor should it prevent the Dispatcher from using the exception message as the HTTP status message – but clients that want the full details of the error should be able to parse them in the format they expected based on the request.
this would also give RequestHandlers the oportunity to return "partial" results - by adding both whatever results they have to the Response as well as the Exception they encountered.
situations where this can't happen are obviously:
- Exception thrown by ResponseWriter
- Exception thrown so early in the request thta the DIspather doesn't know which ResposneWriter the client wanted.
...in those cases, plain text is a wise choice.
thing that would probably need to be done to make this work:
1) if the Dispatcher catches an exception, it should call SolrQueryResponse.setException, set the HTTP status code/message as it currently does, but then hand off to the ResponseWriter.
2) Dispatcher needs to check SolrQueryResponse.getException and set the HTTP status code/message just like if it caught the exception itself.
3) all of the ResponseWriters should start looking at SolrQueryResponse.getException if they aren't already, and formatting it in a usefull way.
4) if the ResponseWriter throws an exception, Dispatcher needs to return a nice plain text error page
extension to this idea... add a new method to ResponseWriter to generate a generic error message in the appropriate format that Dispatcher can use if the ResponseWriter throws an exception (as a backup before resorting to plain text)
Attachments
Attachments
Issue Links
- incorporates
-
SOLR-1576 Provide better error reporting for clients performing updates (or other operations)
- Open
- is depended upon by
-
SOLR-3205 Better error reporting from Analysis UI
- Closed
-
SOLR-2399 Solr Admin Interface, reworked
- Closed
- is duplicated by
-
SOLR-691 Standardized XML Response
- Resolved
- is related to
-
SOLR-2527 When an indexing request is bad, SolrJ just throws an error message - "Bad Request" but does not tell you what about the request was wrong.
- Closed
- relates to
-
SOLR-1528 A non-200 response code gives no response body with wt=javabin
- Closed