[
https://issues.apache.org/jira/browse/SOLR-11631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16247644#comment-16247644
]
Steve Rowe commented on SOLR-11631:
-----------------------------------
bq. I don't think we should throw SolrException . We should set appropriate
status in the responseHeader if an errors key is present
Why is the errors key in the response body instead of the responseHeader?
Seems sketchy to me to set status based on a body key that might be used for
things not related to status.
BTW at present the only way to set the status is via the response exception -
see {{SolrCore.postDecorateResponse()}}.
> Schema API always has status 0
> ------------------------------
>
> Key: SOLR-11631
> URL: https://issues.apache.org/jira/browse/SOLR-11631
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Steve Rowe
> Attachments: SOLR-11631.patch
>
>
> Schema API failures always return status=0.
> Consumers should be able to detect failure using normal mechanisms (i.e.
> status != 0) rather than having to parse the response for "errors". Right
> now if I attempt to {{add-field}} an already existing field, I get:
> {noformat}
> {responseHeader={status=0,QTime=XXX},errors=[{add-field={name=YYY, ...},
> errorMessages=[Field 'YYY' already exists.]}]}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]