You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2018/01/11 19:22:01 UTC

[jira] [Updated] (SOLR-5788) Document update in case of error doesn't return the error message correctly

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

Cassandra Targett updated SOLR-5788:
------------------------------------
    Component/s: update

> Document update in case of error doesn't return the error message correctly
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-5788
>                 URL: https://issues.apache.org/jira/browse/SOLR-5788
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 4.6.1
>            Reporter: Yago Riveiro
>
> I found a issue when updating a document.
> If for any reason the update can't be done, example: the schema doesn't match with the incoming doc; the error raise to the user is something like:
> {noformat}
> curl 'http://localhost:8983/solr/collection1/update?commit=true' --data-binary @doc.json -H 'Content-type:application/json'
> {"responseHeader":{"status":400,"QTime":52},"error":{"msg":"Bad Request\n\n\n\nrequest: http://localhost:8983/solr/collection1_shard3_replica1/update?update.distrib=TOLEADER&distrib.from=http%3A%2F%2Flocalhost%3A8983%2Fsolr%2Fcollection1_shard1_replica2%2F&wt=javabin&version=2","code":400}}
> {noformat}
> In case that the update was done on the leader, the error message is (IMHO) the correct and with valuable info:
> {noformat}
> curl 'http://localhost:8983/solr/collection1/update?commit=true' --data-binary @doc.json -H 'Content-type:application/json'
> {"responseHeader":{"status":400,"QTime":19},"error":{"msg":"ERROR: [doc=01!12967564] Error adding field 'source'='[Direct]' msg=For input string: \"Direct\","code":400}}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org