summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2009-05-17 03:54:02 +0000
committerPaul Joseph Davis <davisp@apache.org>2009-05-17 03:54:02 +0000
commitc3d9038534329527ebc11241dc8ddb2ec788c60f (patch)
treed81eeab92c46ec3e01f4970a730975354fc278f2 /src
parent04bd244c1249fb3dc0581d97e8bbf4cdcd808d7c (diff)
Fixes COUCHDB-41
When a database doesn't exist, it now returns: {"error": "not_found", "reason": "no_db_file"} git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@775577 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_db.erl2
-rw-r--r--src/couchdb/couch_httpd.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index e065ff3b..95a68311 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -52,7 +52,7 @@ open_db_file(Filepath, Options) ->
ok = file:rename(Filepath ++ ".compact", Filepath),
{ok, Fd};
{error, enoent} ->
- not_found
+ {not_found, no_db_file}
end;
Error ->
Error
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 0f29bae7..1acb6b1b 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -469,7 +469,7 @@ error_info({bad_request, Reason}) ->
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) ->