From b61d25f5d15922cd36fd3768cada11ab42d87897 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 14 Jun 2010 11:46:14 -0400 Subject: more obvious file_exists create error handling --- src/chttpd_db.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/chttpd_db.erl') diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 10388ff5..dc1f6df3 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -149,6 +149,8 @@ create_db_req(#httpd{user_ctx=UserCtx}=Req, DbName) -> ok -> DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)), send_json(Req, 201, [{"Location", DocUrl}], {[{ok, true}]}); + {error, file_exists} -> + chttpd:send_error(Req, file_exists); Error -> throw(Error) end. -- cgit v1.2.3