From: Mickael Remond Date: Mon, 1 Aug 2016 06:58:49 +0000 (+0200) Subject: Fix HTTP process return formatting X-Git-Tag: 16.08~6^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5c394e929d508a0b04efcae6abc696c142d0802;p=ejabberd Fix HTTP process return formatting --- diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index d33fb7a7f..a91c3c1a7 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -253,7 +253,7 @@ process([Call], #request{method = 'GET', q = Data, ip = IP} = Req) -> catch %% TODO We need to refactor to remove redundant error return formatting throw:{error, unknown_command} -> - {404, 40, <<"Command not found.">>}; + json_format({404, 40, <<"Command not found.">>}); _:_Error -> ?DEBUG("Bad Request: ~p ~p", [_Error, erlang:get_stacktrace()]),