summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wenk <andy@nms.de>2014-03-21 22:57:04 +0100
committerAndy Wenk <andy@nms.de>2014-03-21 22:57:04 +0100
commit29256149029714af6379dadd62022ee6f46b58ec (patch)
tree29a2d3791f58382a0a7ba3e291c662861bb90055
parentebbee3c58390430b5095ba9977720f7f409bab3f (diff)
downloadcouchdb-29256149029714af6379dadd62022ee6f46b58ec.tar.gz
fix documentation
explain why the HTTP status code 400 will be returned when ?rev= is included in the request URL
-rw-r--r--share/doc/src/api/database/common.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/doc/src/api/database/common.rst b/share/doc/src/api/database/common.rst
index f715c70c8..a1483d94d 100644
--- a/share/doc/src/api/database/common.rst
+++ b/share/doc/src/api/database/common.rst
@@ -223,6 +223,12 @@
Deletes the specified database, and all the documents and attachments
contained within it.
+ .. note::
+
+ To avoid deleting a database, CouchDB will respond with the HTTP status code 400
+ when the request URL includes a ?rev= parameter. This suggests that one wants to delete
+ a document but forgot to add the document id to the URL.
+
:param db: Database name
:<header Accept: - :mimetype:`application/json`
- :mimetype:`text/plain`
@@ -230,7 +236,7 @@
- :mimetype:`text/plain; charset=utf-8`
:>json boolean ok: Operation status
:code 200: Database removed successfully
- :code 400: Invalid database name
+ :code 400: Invalid database name or forgotten document id by accident
:code 401: CouchDB Server Administrator privileges required
:code 404: Database doesn't exist