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

Jason Gerlowski commented on SOLR-11551:
----------------------------------------

Thanks for refreshing the patch Steve (and bringing it back to my attention as 
a result).  I had let this sit initially as it was waiting on SOLR-11608, but 
that fix went in awhile ago.

To circle back to the earlier discussion around 404's; longterm I think that's 
the right "status" value for Solr to return.  It's a common status code that 
most users are familiar with intuitively, and it allows us to distinguish 
between two similar but distinct types of failures.  But I don't think trying 
to squeeze that in here is the right call, since (as Shawn pointed out) it 
doesn't seem to be returned by any APIs currently (and this JIRA has so far 
been scoped to the CoreAdmin APIs).

If no one objects, I'd like to take a second look at the test coverage for this 
and merge it in later this week.

> Standardize response codes and success/failure determination for core-admin 
> api calls
> -------------------------------------------------------------------------------------
>
>                 Key: SOLR-11551
>                 URL: https://issues.apache.org/jira/browse/SOLR-11551
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>            Assignee: Jason Gerlowski
>            Priority: Major
>         Attachments: SOLR-11551.patch, SOLR-11551.patch
>
>
> If we were to tackle SOLR-11526 I think we need to start fixing the core 
> admin api's first.
> If we are relying on response codes I think we should make the following 
> change and fix all the APIs 
> {code}
>   interface CoreAdminOp {
>     void execute(CallInfo it) throws Exception;
>   }
> {code}
> To
> {code}
>   interface CoreAdminOp {
>     /**
>      *
>      * @param it request/response object
>      *
>      * If the request is invalid throw a SolrException with 
> SolrException.ErrorCode.BAD_REQUEST ( 400 )
>      * If the execution of the command fails throw a SolrException with 
> SolrException.ErrorCode.SERVER_ERROR ( 500 )
>      * Add a "error-message" key to the response object with the exception ( 
> this part should be done at the caller of this method so that each operation 
> doesn't need to do the same thing )
>      */
>     void execute(CallInfo it);
>   }
> {code}
> cc [~gerlowskija]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to