summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-05-10 19:20:23 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-05-10 19:20:23 +0000
commit9fe71aa326782f9dc1dc04914cd57e3b12d48af7 (patch)
treeafce14f5321a729b64d4d3c778285b5b637afff0 /share/www
parent2c8bc8ed6a2dc4ecdde08e779e4882f189485271 (diff)
refactor JSON body error handling, also consolidate update_docs JSON response generation.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@773387 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/basics.js4
-rw-r--r--share/www/script/test/view_errors.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js
index 8e6d4c7a..00785dc8 100644
--- a/share/www/script/test/basics.js
+++ b/share/www/script/test/basics.js
@@ -204,14 +204,14 @@ couchTests.basics = function(debug) {
T(xhr.status == 400);
result = JSON.parse(xhr.responseText);
T(result.error == "bad_request");
- T(result.reason == "Body must be a JSON object");
+ T(result.reason == "Request body must be a JSON object");
// Body of an _all_docs multi-get is not a {"key": [...]} structure.
xhr = CouchDB.request("POST", "/test_suite_db/_all_docs", {body: "[]"});
T(xhr.status == 400);
result = JSON.parse(xhr.responseText);
T(result.error == "bad_request");
- T(result.reason == "Body must be a JSON object");
+ T(result.reason == "Request body must be a JSON object");
var data = "{\"keys\": 1}";
xhr = CouchDB.request("POST", "/test_suite_db/_all_docs", {body:data});
T(xhr.status == 400);
diff --git a/share/www/script/test/view_errors.js b/share/www/script/test/view_errors.js
index 1a613c04..ec0dcce6 100644
--- a/share/www/script/test/view_errors.js
+++ b/share/www/script/test/view_errors.js
@@ -123,7 +123,7 @@ couchTests.view_errors = function(debug) {
T(xhr.status == 400);
result = JSON.parse(xhr.responseText);
T(result.error == "bad_request");
- T(result.reason == "Body must be a JSON object");
+ T(result.reason == "Request body must be a JSON object");
var data = "{\"keys\": 1}";
xhr = CouchDB.request("POST", path, {body:data});
T(xhr.status == 400);