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

v2 API introspect should return useful message for non-existent command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 7.0
    • v2 API
    • None

    Description

      Instead of failing, v2 API introspect requests that filter for a non-existent command succeed and show null for the command spec.

      E.g., after bin/solr start -e cloud -noprompt, curl "http://localhost:8983/v2/c/gettingstarted/_introspect?method=POST&command=XXXXX&indent=on" returns:

      {
        "spec":[{
            "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API",
            "description":"Several collection-level operations are supported with this endpoint: modify collection attributes; reload a collection; migrate documents to a different collection; rebalance collection leaders; balance properties across shards; and add or delete a replica property.",
            "methods":["POST"],
            "url":{"paths":["/collections/{collection}",
                "/c/{collection}"]},
            "commands":{"XXXXX":null}}],
        "WARNING":"This response format is experimental.  It is likely to change in the future.",
        "availableSubPaths":{ [...] }
      }
      

      Attachments

        1. SOLR-10408.patch
          5 kB
          Cao Manh Dat

        Activity

          People

            caomanhdat Cao Manh Dat
            sarowe Steven Rowe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: