summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2017-08-10 20:06:23 +0100
committerGitHub <noreply@github.com>2017-08-10 20:06:23 +0100
commit4cd94eb9db0993434c39876a1c7d3b776761f5df (patch)
treee45fb883cdba4ba74a00df43a4d7401feccd7151
parent52da19b9c0f75e0afbb3267b8766343c270fdcf7 (diff)
parent8e2c5b3ee13853529042b4b2f5a606efbb725ae7 (diff)
downloadcouchdb-4cd94eb9db0993434c39876a1c7d3b776761f5df.tar.gz
Merge pull request #744 from cloudant/allow-503-response
Allow a 503 response to be thrown
-rw-r--r--src/chttpd/src/chttpd.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl
index 178209bf5..425f95a6f 100644
--- a/src/chttpd/src/chttpd.erl
+++ b/src/chttpd/src/chttpd.erl
@@ -910,6 +910,8 @@ error_info(not_implemented) ->
error_info(timeout) ->
{500, <<"timeout">>, <<"The request could not be processed in a reasonable"
" amount of time.">>};
+error_info({service_unavailable, Reason}) ->
+ {503, <<"service unavailable">>, Reason};
error_info({timeout, _Reason}) ->
error_info(timeout);
error_info({Error, null}) ->