You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Niels Boldt <ni...@gmail.com> on 2012/03/15 16:47:08 UTC

error when deleting an document

Hi,

I get the following error when trying to delete a document

c:\Program Files\curl>curl -X DELETE
http://localhost:5984/crawl_3/myid?rev=1-b1
52c6ee36fc9fde91898a52d035358f -v
* About to connect() to localhost port 5984 (#0)
*   Trying 127.0.0.1... connected
> DELETE /crawl_3/myid?rev=1-b152c6ee36fc9fde91898a52d035358f HTTP/1.1
> User-Agent: curl/7.23.1 (x86_64-pc-win32) libcurl/7.23.1 OpenSSL/0.9.8r
zlib/1
.2.5
> Host: localhost:5984
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Server: CouchDB/1.1.1 (Erlang OTP/R14B03)
< Date: Thu, 15 Mar 2012 15:43:56 GMT
< Content-Type: text/plain;charset=utf-8
< Content-Length: 58
< Cache-Control: must-revalidate
<
{"error":"forbidden","reason":"Document must have a url"}
* Connection #0 to host localhost left intact
* Closing connection #0

I tried also doing it from Futon using the ui and it gave the same error.
There was no difference if I was logged in as administrator.

I can't really figure out what the problem is here. Google does not really
turn anything up here.

Any suggestions?

Thanks
Niels




-- 
BinaryConstructors ApS
Vestergade 10a, 4th
1456 Kbh K
Denmark
phone: +4529722259
web: http://www.binaryconstructors.dk
mail: nb@binaryconstructors.dk
skype: nielsboldt

Re: error when deleting an document

Posted by Zachary Zolton <za...@gmail.com>.
Niels,

Sounds like you have validate_doc_update function defined in one of that
database's design documents. Basically, you'll want to ensure that this
function doesn't check for the "url" property when the document's
"_deleted" property is true.

Here's an old thread for a simliar problem:

http://mail-archives.apache.org/mod_mbox/couchdb-user/201001.mbox/%3Ce282921e1001082115s12031a93h7359bdecaff3207b@mail.gmail.com%3E


Cheers,

Zach