couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Bram Neijt (JIRA)" <>
Subject [jira] Commented: (COUCHDB-674) Inconsistent error response, DELETE vs _bulk_docs deleted=true
Date Tue, 09 Nov 2010 14:26:15 GMT


A. Bram Neijt commented on COUCHDB-674:

Wouldn't it be weird to get a "can't find the document" if you want to mark it as deleted?

I mean, there is a difference between actually deleting it and updating it to a deleted state.
The first implies the object is there, the second implies the object is in a deletable state.

I'm not convinced they should return the same error messages.

> Inconsistent error response, DELETE vs _bulk_docs deleted=true
> --------------------------------------------------------------
>                 Key: COUCHDB-674
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Matt Goodall
> The result from deleting an already deleted document using an HTTP DELETE and a _bulk_docs
{"deleted": true} is not consistent.
> $ curl http://localhost:5984/scratch/foo -X PUT -d '{}'
> {"ok":true,"id":"foo","rev":"1-967a00dff5e02add41819138abb3284d"}
> $ curl http://localhost:5984/scratch/foo?rev=1-967a00dff5e02add41819138abb3284d -X DELETE
> {"ok":true,"id":"foo","rev":"2-eec205a9d413992850a6e32678485900"}
> $ curl http://localhost:5984/scratch/foo?rev=1-967a00dff5e02add41819138abb3284d -X DELETE
> {"error":"not_found","reason":"deleted"}
> $ curl http://localhost:5984/scratch/_bulk_docs -X POST -d '{"docs": [{"_id": "foo",
"_rev": "1-967a00dff5e02add41819138abb3284d", "_deleted": true}]}'
> [{"id":"foo","error":"conflict","reason":"Document update conflict."}]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message