On Jan 21, 2007, at 2:39 PM, Yonik Seeley wrote:

On 1/21/07, Ryan McKinley <[EMAIL PROTECTED]> wrote:
>
> So is everyone happy with the way that errors are currently reported? > If not, now (or right after this is committed), is the time to change > that. /solr/select/qt="myhandler" should be backward compatible, but
> /solr/myhandler doesn't need to be.  Same for the update stuff.
>

In SOLR-104, all exceptions are passed to the client as HTTP Status
codes with the message.  If you write:

  throw new SolrException( 400, "missing parameter: "+p );

This will return 400 with a message "missing parameter: " + p.

Exceptions or SolrExceptions with code=500 || code<100 are sent to
client with status code 500 and a full stack trace.

That all seems ideal to me, but there had been talk in the past about
formatted responses on errors.  Given that even update handlers can
return full responses, I don't see the point of formatted (XML,etc)
response bodies when an exception is thrown.
Just making sure there's a consensus.

Being able to check the HTTP status code to determine if there is an error, rather than having to parse XML and get a Solr-specific status code seems best for the Ruby work we're doing. I'll confer with the others working on it and report back if they have any suggestions for improvement also.

        Erik

Reply via email to