summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_db.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-07-22 14:31:52 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-07-22 14:31:52 +0000
commit347015fbde4b1d76de8140af725a101c707f967b (patch)
tree418687a9e9c8480c79b51aec7c40450dbb1b989c /src/couchdb/couch_httpd_db.erl
parent1ae01c6a2646681355b174e2f85a51086a9df41c (diff)
humane error message on missing design handler
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@966687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r--src/couchdb/couch_httpd_db.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index 9cf8a3b4..789db5d0 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -144,7 +144,9 @@ handle_design_req(#httpd{
% load ddoc
DesignId = <<"_design/", DesignName/binary>>,
DDoc = couch_httpd_db:couch_doc_open(Db, DesignId, nil, []),
- Handler = couch_util:dict_find(Action, DesignUrlHandlers, fun db_req/2),
+ Handler = couch_util:dict_find(Action, DesignUrlHandlers, fun(A,B,C) ->
+ throw({not_found, <<"missing handler: ", Action/binary>>})
+ end),
Handler(Req, Db, DDoc);
handle_design_req(Req, Db) ->