You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Nick Vatamaniuc (JIRA)" <ji...@apache.org> on 2016/08/03 02:43:20 UTC

[jira] [Closed] (COUCHDB-2815) POST to /{db}/_all_docs with invalid keys should return a 400 error instead of 500

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

Nick Vatamaniuc closed COUCHDB-2815.
------------------------------------

> POST to /{db}/_all_docs with invalid keys should return a 400 error instead of 500
> ----------------------------------------------------------------------------------
>
>                 Key: COUCHDB-2815
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2815
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, HTTP Interface
>            Reporter: Nick Vatamaniuc
>             Fix For: 2.0.0
>
>
> Related to http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs end point.
> Example:
>  *  db1 created with two documents ids : "1" and "2".
> {code}
>  http -a adm:pass POST http://127.0.0.1:15984/db1/_all_docs  keys:='["1",2]'
> HTTP/1.1 500 Internal Server Error
> Cache-Control: must-revalidate
> Content-Length: 43
> Content-Type: application/json
> Date: Wed, 16 Sep 2015 18:25:08 GMT
> Server: CouchDB/b8b9968 (Erlang OTP/17)
> X-Couch-Request-ID: 898d97fc1f
> X-CouchDB-Body-Time: 0
> {
>     "error": "2",
>     "reason": "{illegal_docid,2}"
> }
> {code}
> Expected 400 error instead as there is nothing wrong with on the server.



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