Skip to content

Commit

Permalink
Use chttpd:send_error/2 in mango_httpd
Browse files Browse the repository at this point in the history
We used to call non exported function chttpd:send_error/6. Switch to
public `chttpd:send_error/2` for sending error.
  • Loading branch information
iilyak committed Mar 6, 2018
1 parent 0464c46 commit e1fa0f5
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 e1fa0f5

Please sign in to comment.