diff options
author | Garren Smith <garren.smith@gmail.com> | 2021-01-18 14:03:22 +0200 |
---|---|---|
committer | garren smith <garren.smith@gmail.com> | 2021-01-18 14:37:29 +0200 |
commit | 053595cf9b536801e8bd39dd54f6526f463dfdb9 (patch) | |
tree | 821b26818cce96e0f3f613cf3c850940d61195ee | |
parent | 94c5fe0b713958b9472cbee7f644da09d1b54408 (diff) | |
download | couchdb-053595cf9b536801e8bd39dd54f6526f463dfdb9.tar.gz |
add http error for fdb 1031
-rw-r--r-- | src/chttpd/src/chttpd.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chttpd/src/chttpd.erl b/src/chttpd/src/chttpd.erl index 636aad98b..0c5e27259 100644 --- a/src/chttpd/src/chttpd.erl +++ b/src/chttpd/src/chttpd.erl @@ -364,6 +364,8 @@ catch_error(HttpReq, error, not_ciphertext) -> send_error(HttpReq, not_ciphertext); catch_error(HttpReq, error, {erlfdb_error, 2101}) -> send_error(HttpReq, transaction_too_large); +catch_error(HttpReq, error, {erlfdb_error, 1031}) -> + send_error(HttpReq, transaction_timeout); catch_error(HttpReq, Tag, Error) -> Stack = erlang:get_stacktrace(), % TODO improve logging and metrics collection for client disconnects @@ -999,6 +1001,9 @@ error_info({doc_validation, Reason}) -> {400, <<"doc_validation">>, Reason}; error_info({invalid_since_seq, Reason}) -> {400, <<"invalid_since_seq">>, Reason}; +error_info(transaction_timeout) -> + {408, <<"transaction_timeout">>, + <<"The request transaction timed out" >>}; error_info({missing_stub, Reason}) -> {412, <<"missing_stub">>, Reason}; error_info(request_entity_too_large) -> |