From 1fa3780c53d56b5d583eae39cd027216e22e9f2e Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Thu, 22 Jul 2010 14:29:30 +0000 Subject: humane error message on missing design handler git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@966685 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 29b20c21..9b2014f3 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) -> -- cgit v1.2.3