Skip to content

Commit

Permalink
Merge pull request apache#1193 from cloudant/fix-error-reporting-in-m…
Browse files Browse the repository at this point in the history
…ango

Use `chttpd:send_error/2` in mango_httpd
  • Loading branch information
iilyak authored Mar 6, 2018
2 parents 0464c46 + e1fa0f5 commit 087a1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mango/src/mango_httpd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 087a1b2

Please sign in to comment.