[
https://issues.apache.org/jira/browse/SOLR-11631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249030#comment-16249030
]
Noble Paul commented on SOLR-11631:
-----------------------------------
[~steve_rowe]
Let's see what we want to achieve.
# Errors should not return status=0 in response headers
# The error details key need to be standardized. We have errorMessages and
errors in different places
# Where to put the error key? as a separate kley or, within the
{{responseHeader}} object
The problem with all out v1 APIs was that we never returned a proper payload.
We threw exceptions and jetty returned some html errors which dod not have any
response header or anything. While designing V2 API we had to make the choice
of return proper payload for v2 apis but , v1 apis had to be back compatible.
So, we chose to keep V1 APIs to return in the old format.
We can make a wholesale change for the whole error handling thing. But let's
first decide on what is the appropriate format
> 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]