You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/07 12:31:58 UTC

[GitHub] [couchdb] mojito317 opened a new issue #2242: Using _bulk_docs with new_edits false and without _rev responds with 500 Server Error

mojito317 opened a new issue #2242: Using _bulk_docs with new_edits false and without _rev responds with 500 Server Error
URL: https://github.com/apache/couchdb/issues/2242
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   Using `_bulk_docs` with `"new_edits": false` and without `_rev` responds with `500` Server Error. I understand I should always include `_rev` into the document, but if I don't, it is a bad request, isn't it?
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   ```
   curl -X POST \
     localhost:5984/bulk/_bulk_docs \
     -d '{
       "docs": [
           {
               "_id": "FishStew"
           }
       ],
       "new_edits": false
   }'
   ```
   Response: 
   **500 Internal Server Error**
   ```
   {
       "error": "unknown_error",
       "reason": "function_clause",
       "ref": 4219589076
   }
   ```
   
   ## Expected Behaviour
   
   [NOTE]: # ( Tell us what you expected to happen. )
   When `"new_edits": false` is supplied and a document is found without a `_rev` the server should respond `400` bad request not `500` internal server error.
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB Version used: 2.3.1
   * Browser name and version: PostmanRuntime/7.17.1
   * Operating System and version: macOS Mojave 10.14.6
   
   ## Additional context
   
   [TIP]:  # ( Add any other context about the problem here. )
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services