histrio/py-couchdb

can delete nonexistent attachment

dedalus2000 opened this issue · 1 comments

In client.py#416 I can see:
..
414: r = resource.delete(filename, params={'rev': _doc['_rev']})
415: if r.status_code == 404:
416: raise NotFound("filename {0} not found".format(filename))
..

As far we can -try to- delete a nonexistent file without get any error I think the 416 row is showing the wrong error message.

In fact:
curl -X DELETE http://localhost:5984/composite/3c4d73b523db075f51884e1fea0000af/notexists.pdf?rev=30-88c02febc80225edb13c776e86460b27
{"ok":true,"id":"3c4d73b523db075f51884e1fea0000af","rev":"31-5a690ab5da880a639455af989ed1e895"}

I'm using the couchdb version "1.4.0+build.6187ba5" , I don't know if this is the standard (and not buggy) couchdb behaviour

Old bug and seems couchdb specific behavior.