Add a friendly error response for timeouts
Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/9902a471 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/9902a471 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/9902a471 Branch: refs/heads/import Commit: 9902a471875442240dd4d7033fe596e96e0d6bae Parents: 15e8ea6 Author: Robert Newson <[email protected]> Authored: Tue Mar 5 15:26:26 2013 -0600 Committer: Robert Newson <[email protected]> Committed: Tue Mar 5 20:18:08 2013 -0600 ---------------------------------------------------------------------- src/chttpd.erl | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/9902a471/src/chttpd.erl ---------------------------------------------------------------------- diff --git a/src/chttpd.erl b/src/chttpd.erl index 59485f5..7c80422 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -689,6 +689,9 @@ error_info({missing_stub, Reason}) -> {412, <<"missing_stub">>, Reason}; error_info(not_implemented) -> {501, <<"not_implemented">>, <<"this feature is not yet implemented">>}; +error_info(timeout) -> + {500, <<"timeout">>, <<"The request could not be processed in a reasonable" + " amount of time.">>}; error_info({Error, null}) -> {500, couch_util:to_binary(Error), null}; error_info({Error, Reason}) ->
