[ 
https://issues.apache.org/jira/browse/SOLR-16698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ILARIA PETRETI updated SOLR-16698:
----------------------------------
    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:
{code:java}
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}}{code}
The same happens with a typo in the "model-store" (we write model*s*-store with 
an additional {*}s{*}):
{code:java}
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}{code}
These error messages could be improved with a clearer definition of the error.

  was:
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:

{color:#172b4d}{{}}{color}
{code:java}
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}}{code}
{color:#172b4d}{{}}{color}

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

{color:#172b4d}{{}}{color}
{code:java}
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}{code}
{color:#172b4d}{{}}{color}

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


> Unclear error message due to a typo
> -----------------------------------
>
>                 Key: SOLR-16698
>                 URL: https://issues.apache.org/jira/browse/SOLR-16698
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - LTR
>    Affects Versions: 9.1.1
>            Reporter: ILARIA PETRETI
>            Priority: Minor
>
> 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:
> {code:java}
> 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}}{code}
> The same happens with a typo in the "model-store" (we write model*s*-store 
> with an additional {*}s{*}):
> {code:java}
> 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}{code}
> These error messages could be improved with a clearer definition of the error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to