couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r966687 - /couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl
Date Thu, 22 Jul 2010 14:31:52 GMT
Author: jchris
Date: Thu Jul 22 14:31:52 2010
New Revision: 966687

URL: http://svn.apache.org/viewvc?rev=966687&view=rev
Log:
humane error message on missing design handler

Modified:
    couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl

Modified: couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl?rev=966687&r1=966686&r2=966687&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_httpd_db.erl Thu Jul 22 14:31:52 2010
@@ -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) ->



Mime
View raw message