[
https://issues.apache.org/jira/browse/SOLR-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15195953#comment-15195953
]
ASF subversion and git services commented on SOLR-8836:
-------------------------------------------------------
Commit 4deb4cd1bac4d18914164fccc3e377eb8f11a117 in lucene-solr's branch
refs/heads/branch_6x from anshum
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4deb4cd ]
SOLR-8836: Return 400, and a SolrException when an invalid json is provided to
the update handler instead of 500.
> /update should return BAD REQUEST when invalid JSON provided
> ------------------------------------------------------------
>
> Key: SOLR-8836
> URL: https://issues.apache.org/jira/browse/SOLR-8836
> Project: Solr
> Issue Type: Bug
> Affects Versions: master
> Reporter: Jason Gerlowski
> Assignee: Anshum Gupta
> Priority: Trivial
> Fix For: master
>
> Attachments: SOLR-8836.patch, SOLR-8836.patch
>
>
> When a user provides invalid JSON to the /update endpoint, the request fails
> with a 500 (INTERNAL SERVER ERROR). If the user looks at the response body,
> they'll see a message indicating that the provided JSON was invalid.
> However, going from the status code alone, the failure is indistinguishable
> from a true server-error. This is a bit misleading. It would be nice if
> Solr instead returned a 400 (BAD REQUEST) status code when it detects invalid
> arguments.
> Reproduction Steps:
> 1.) bin/solr start -e cloud -noprompt
> 2.) curl -i -l -k -X POST -H 'Content-Type: application/json'
> 'http://localhost:8983/solr/gettingstarted/update' --data-binary '}{'
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]