You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2012/06/09 01:40:23 UTC

[jira] [Commented] (SOLR-3497) Make HTTP error default for exceptions

    [ https://issues.apache.org/jira/browse/SOLR-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292097#comment-13292097 ] 

Hoss Man commented on SOLR-3497:
--------------------------------

I don't understand this request.

I don't see any way that SOLR-141 changed exception handling, or eliminated any existing "fail loudly" behavior -- all SOLR-141 did was make the HTTP error responses machine parsable using the requested writer type ... but they are still HTTP errors...

{noformat}
hossman@bester:~/lucene/dev/solr$ curl -sS -D - 'http://localhost:8983/solr/select?wt=json&q=parser_error:'
HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Sat, 01 Jan 2000 01:00:00 GMT
Last-Modified: Fri, 08 Jun 2012 23:38:43 GMT
ETag: "137ce76d653"
Content-Type: text/plain;charset=UTF-8
Transfer-Encoding: chunked

{"responseHeader":{"status":400,"QTime":3,"params":{"wt":"json","q":"parser_error:"}},"error":{"msg":"org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'parser_error:': Encountered \"<EOF>\" at line 1, column 13.\nWas expecting one of:\n    <BAREOPER> ...\n    \"(\" ...\n    \"*\" ...\n    <QUOTED> ...\n    <TERM> ...\n    <PREFIXTERM> ...\n    <WILDTERM> ...\n    <REGEXPTERM> ...\n    \"[\" ...\n    \"{\" ...\n    <NUMBER> ...\n    ","code":400}}
hossman@bester:~/lucene/dev/solr$ curl -sS -D - 'http://localhost:8983/solr/select?wt=xml&q=parser_error:'
HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Sat, 01 Jan 2000 01:00:00 GMT
Last-Modified: Fri, 08 Jun 2012 23:38:48 GMT
ETag: "137ce76e771"
Content-Type: application/xml; charset=UTF-8
Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">3</int><lst name="params"><str name="wt">xml</str><str name="q">parser_error:</str></lst></lst><lst name="error"><str name="msg">org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'parser_error:': Encountered "&lt;EOF&gt;" at line 1, column 13.
Was expecting one of:
    &lt;BAREOPER&gt; ...
    "(" ...
    "*" ...
    &lt;QUOTED&gt; ...
    &lt;TERM&gt; ...
    &lt;PREFIXTERM&gt; ...
    &lt;WILDTERM&gt; ...
    &lt;REGEXPTERM&gt; ...
    "[" ...
    "{" ...
    &lt;NUMBER&gt; ...
    </str><int name="code">400</int></lst>
</response>
{noformat}
                
> Make HTTP error default for exceptions
> --------------------------------------
>
>                 Key: SOLR-3497
>                 URL: https://issues.apache.org/jira/browse/SOLR-3497
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Lance Norskog
>
> [SOLR-141] changed the behavior for exception handling. Please make this a value-added feature for those who prefer it. 
> The old behavior uses "Fail Loud" style. This is a very common system design philosophy, and hiding errors in a sub-element violates it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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