diff options
Diffstat (limited to 'src/chttpd.erl')
-rw-r--r-- | src/chttpd.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chttpd.erl b/src/chttpd.erl index ee55f3e8..d178604d 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -118,9 +118,9 @@ handle_request(MochiReq) -> showroom_log:message(notice, LogForClosedSocket, []), exit(normal); throw:Error -> - % ?LOG_DEBUG("Minor error in HTTP request: ~p",[Error]), - % ?LOG_DEBUG("Stacktrace: ~p",[erlang:get_stacktrace()]), send_error(HttpReq, Error); + error:database_does_not_exist -> + send_error(HttpReq, database_does_not_exist); error:badarg -> ?LOG_ERROR("Badarg error in HTTP request",[]), ?LOG_INFO("Stacktrace: ~p",[erlang:get_stacktrace()]), @@ -494,6 +494,8 @@ error_info({bad_request, Reason}) -> {400, <<"bad_request">>, Reason}; error_info({query_parse_error, Reason}) -> {400, <<"query_parse_error">>, Reason}; +error_info(database_does_not_exist) -> + {404, <<"not_found">>, <<"database_does_not_exist">>}; error_info(not_found) -> {404, <<"not_found">>, <<"missing">>}; error_info({not_found, Reason}) -> |