[ 
https://issues.apache.org/jira/browse/COUCHDB-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636182#comment-15636182
 ] 

ASF subversion and git services commented on COUCHDB-3222:
----------------------------------------------------------

Commit 262944f0244c86c5fdb794ebe538fb916ff5415c in couchdb-chttpd's branch 
refs/heads/master from [~mayyas]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=262944f ]

HTTP code 500 instead of 400 for invalid key during document creation

The wrong status code is returned when creating or updating a document
with an invalid key.
Returns:
{u'reason': u'Bad special document member: _invalid_key', u'error':
u'doc_validation'}
HTTPError: 500 Server Error: Internal Server Error
Expected: 400 Bad Request error

COUCHDB-3222


> HTTP code 500 instead of 400 for invalid key during document creation
> ---------------------------------------------------------------------
>
>                 Key: COUCHDB-3222
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3222
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Mayya Sharipova
>            Priority: Trivial
>
> ...dbname/doc1" -d '{"_id":"doc1", "_invalid_key":"jules" }'
> Returns:
> {u'reason': u'Bad special document member: _invalid_key', u'error': 
> u'doc_validation'}
> HTTPError: 500 Server Error: Internal Server Error 
> Expected:  400 Bad Request error



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to