diff options
author | ILYA Khlopotov <iilyak@apache.org> | 2018-03-02 07:19:42 -0800 |
---|---|---|
committer | ILYA Khlopotov <iilyak@apache.org> | 2018-03-06 14:55:21 -0800 |
commit | e1fa0f5fdb9e28fba639ec3be63944d56be0eb56 (patch) | |
tree | 2d2710821631150b61300d30e3dac6955fbab166 | |
parent | 0464c46d180b535179893b5a037ee834466acef5 (diff) | |
download | couchdb-e1fa0f5fdb9e28fba639ec3be63944d56be0eb56.tar.gz |
Use `chttpd:send_error/2` in mango_httpd
We used to call non exported function chttpd:send_error/6. Switch to
public `chttpd:send_error/2` for sending error.
-rw-r--r-- | src/mango/src/mango_httpd.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mango/src/mango_httpd.erl b/src/mango/src/mango_httpd.erl index 3ed51e2f0..2e8777135 100644 --- a/src/mango/src/mango_httpd.erl +++ b/src/mango/src/mango_httpd.erl @@ -41,7 +41,7 @@ handle_req(#httpd{} = Req, Db0) -> case mango_error:info(Module, Reason) of {500, ErrorStr, ReasonStr} -> Stack = erlang:get_stacktrace(), - chttpd:send_error(Req, 500, [], ErrorStr, ReasonStr, Stack); + chttpd:send_error(Req, {ErrorStr, ReasonStr, Stack}); {Code, ErrorStr, ReasonStr} -> chttpd:send_error(Req, Code, ErrorStr, ReasonStr) end |