You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2009/05/17 05:54:03 UTC

svn commit: r775577 - in /couchdb/trunk/src/couchdb: couch_db.erl couch_httpd.erl

Author: davisp
Date: Sun May 17 03:54:02 2009
New Revision: 775577

URL: http://svn.apache.org/viewvc?rev=775577&view=rev
Log:
Fixes COUCHDB-41

When a database doesn't exist, it now returns:

{"error": "not_found", "reason": "no_db_file"}


Modified:
    couchdb/trunk/src/couchdb/couch_db.erl
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.erl?rev=775577&r1=775576&r2=775577&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_db.erl Sun May 17 03:54:02 2009
@@ -52,7 +52,7 @@
             ok = file:rename(Filepath ++ ".compact", Filepath),
             {ok, Fd};
         {error, enoent} ->
-            not_found
+            {not_found, no_db_file}
         end;
     Error ->
         Error

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=775577&r1=775576&r2=775577&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Sun May 17 03:54:02 2009
@@ -469,7 +469,7 @@
 error_info({query_parse_error, Reason}) ->
     {400, <<"query_parse_error">>, Reason};
 error_info(not_found) ->
-    {404, <<"not_found">>, <<"Missing">>};
+    {404, <<"not_found">>, <<"missing">>};
 error_info({not_found, Reason}) ->
     {404, <<"not_found">>, Reason};
 error_info(conflict) ->