diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-06-14 11:46:14 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 11:18:45 -0400 |
commit | b61d25f5d15922cd36fd3768cada11ab42d87897 (patch) | |
tree | d3df3d38b8c802f84f5ab5e7e7ad5e80408a0d79 /src/chttpd_db.erl | |
parent | 35bc59279c9d6de45e27ce87573eeeacfda9289e (diff) |
more obvious file_exists create error handling
Diffstat (limited to 'src/chttpd_db.erl')
-rw-r--r-- | src/chttpd_db.erl | 2 |
1 files changed, 2 insertions, 0 deletions
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. |