Nick Vatamaniuc created COUCHDB-2815:
----------------------------------------

             Summary: 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
      Security Level: public (Regular issues)
          Components: Database Core, HTTP Interface
            Reporter: Nick Vatamaniuc


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)

Reply via email to