You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by vthacker <gi...@git.apache.org> on 2018/07/28 02:06:26 UTC

[GitHub] lucene-solr pull request #402: SOLR-12477 - Return server error(500) for Alr...

Github user vthacker commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/402#discussion_r205929654
  
    --- Diff: solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java ---
    @@ -208,14 +208,17 @@ public void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp) {
             }
           }
         } catch (Exception e) {
    +      boolean hasTragicException = false;
    --- End diff --
    
    Here is what I was thinking of after this statement. What do you think?
    
            if (isTragic) {
              if (e instanceof SolrException) {
                assert ((SolrException) e).code() == 500; //Tragic exceptions should always throw a server error
              } else {
                //wrap it in a solr exception
                e = new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
              }
            }


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org