Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11551

Standardize response codes and success/failure determination for core-admin api calls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.4, 8.0
    • None
    • None

    Description

      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

        interface CoreAdminOp {
          void execute(CallInfo it) throws Exception;
        }
      

      To

        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);
        }
      

      cc gerlowskija

      Attachments

        1. SOLR-11551.patch
          100 kB
          Jason Gerlowski
        2. SOLR-11551.patch
          99 kB
          Steven Rowe
        3. SOLR-11551.patch
          51 kB
          Jason Gerlowski
        4. SOLR-11551.patch
          52 kB
          Jason Gerlowski

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              varun Varun Thacker
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: