diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-01-30 03:50:44 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-01-30 03:50:44 +0000 |
commit | d6fa592563650395d2dfbc814915d239c335bea3 (patch) | |
tree | 1edf7f9a70a93291486e50cde2d2efc250067cfa /src | |
parent | a00cfd9770fad31639905ff8f45e702fcca6e639 (diff) |
swap 412 ad 409 error codes. fixes COUCHDB-226
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 4 | ||||
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 535a864c..56f651d8 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -371,7 +371,7 @@ send_error(Req, not_found) -> send_error(Req, {not_found, Reason}) -> send_error(Req, 404, <<"not_found">>, Reason); send_error(Req, conflict) -> - send_error(Req, 412, <<"conflict">>, <<"Document update conflict.">>); + send_error(Req, 409, <<"conflict">>, <<"Document update conflict.">>); send_error(Req, {forbidden, Msg}) -> send_json(Req, 403, {[{<<"error">>, <<"forbidden">>}, @@ -397,7 +397,7 @@ send_error(Req, {user_error, {Props}}) -> {[{<<"error">>, proplists:get_value(<<"error">>, Props)}, {<<"reason">>, proplists:get_value(<<"reason">>, Props)}]}); send_error(Req, file_exists) -> - send_error(Req, 409, <<"file_exists">>, <<"The database could not be " + send_error(Req, 412, <<"file_exists">>, <<"The database could not be " "created, the file already exists.">>); send_error(Req, {Error, Reason}) -> send_error(Req, 500, Error, Reason); diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 3a8abaf3..7d744d91 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -369,7 +369,7 @@ all_docs_view(Req, Db, Keys) -> db_doc_req(#httpd{method='DELETE'}=Req, Db, DocId) -> case extract_header_rev(Req, couch_httpd:qs_value(Req, "rev")) of missing_rev -> - couch_httpd:send_error(Req, 412, <<"missing_rev">>, + couch_httpd:send_error(Req, 409, <<"missing_rev">>, <<"Document rev/etag must be specified to delete">>); RevToDelete -> {ok, NewRev} = couch_db:delete_doc(Db, DocId, [RevToDelete]), |