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

Unclear error message due to a typo

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 9.1.1
    • None
    • contrib - LTR
    • None

    Description

      If we execute a PUT request with a typo in the "feature-store" endpoint (we write feature*s*-store with an additional s), we receive an unclear error message:

      curl -XPUT "http://localhost:8983/solr/books/schema/features-store" --data-binary "@features.json" -H "Content-type:application/json" { "responseHeader":{ "status":400, "QTime":9}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Expected Map to create a new ManagedResource but received a java.util.ArrayList", "code":400}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Expected Map to create a new ManagedResource but received a java.util.ArrayList", "code":400}}

      The same happens with a typo in the "model-store" (we write model*s*-store with an additional s):

      curl -XPUT "http://localhost:8983/solr/books/schema/models-store" --data-binary "@model.json" -H "Content-type:application/json" { "responseHeader":{ "status":500, "QTime":1}, "error":{ "msg":"class org.apache.solr.ltr.model.LinearModel", "trace":"java.lang.ClassCastException: class org.apache.solr.ltr.model.LinearModel\n\tat java.base/java.lang.Class.asSubclass(Class.java:3924)\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:533)\n\tat ... java.base/java.lang.Thread.run(Thread.java:833)\n", "code":500}

      These error messages could be improved with a clearer definition of the error.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ilariapet ilariapet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: