You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2017/03/01 16:39:21 UTC

[34/50] couch commit: updated refs/heads/2971-count-distinct to ee32cd5

Return "Bad Request" when count in /_uuids exceeds max


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/8fd7d520
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/8fd7d520
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/8fd7d520

Branch: refs/heads/2971-count-distinct
Commit: 8fd7d52093dceb87ac6535dae21a2b006d86018c
Parents: 5d79304
Author: Eric Avdey <ei...@eiri.ca>
Authored: Wed Jan 18 09:55:19 2017 -0400
Committer: Eric Avdey <ei...@eiri.ca>
Committed: Wed Jan 18 10:32:26 2017 -0400

----------------------------------------------------------------------
 src/couch_httpd_misc_handlers.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/8fd7d520/src/couch_httpd_misc_handlers.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_misc_handlers.erl b/src/couch_httpd_misc_handlers.erl
index 8d7ce5e..eb75a94 100644
--- a/src/couch_httpd_misc_handlers.erl
+++ b/src/couch_httpd_misc_handlers.erl
@@ -129,7 +129,7 @@ handle_uuids_req(#httpd{method='GET'}=Req) ->
     Max = list_to_integer(config:get("uuids","max_count","1000")),
     Count = try list_to_integer(couch_httpd:qs_value(Req, "count", "1")) of
         N when N > Max ->
-            throw({forbidden, <<"count parameter too large">>});
+            throw({bad_request, <<"count parameter too large">>});
         N when N < 0 ->
             throw({bad_request, <<"count must be a positive integer">>});
         N -> N