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.
-Yonik