]> granicus.if.org Git - ejabberd/commitdiff
Fix HTTP process return formatting
authorMickael Remond <mremond@process-one.net>
Mon, 1 Aug 2016 06:58:49 +0000 (08:58 +0200)
committerMickael Remond <mremond@process-one.net>
Mon, 1 Aug 2016 06:58:49 +0000 (08:58 +0200)
src/mod_http_api.erl

index d33fb7a7fbb99b3d34006aad5645fb7ed6c93ba7..a91c3c1a7cd65152fb5c57eaf2d133f1aeebf09e 100644 (file)
@@ -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()]),