]> granicus.if.org Git - ejabberd/commitdiff
Fix 404 response formatting (thanks to Kaggggggga)(#1306)
authorBadlop <badlop@process-one.net>
Wed, 28 Sep 2016 09:03:46 +0000 (11:03 +0200)
committerBadlop <badlop@process-one.net>
Wed, 28 Sep 2016 09:03:46 +0000 (11:03 +0200)
src/mod_http_api.erl

index dbca82375b51a0d355174917abd1e800e435ba41..7a95f8c6f039e2f601f7e978624bd232db42b6df 100644 (file)
@@ -226,7 +226,7 @@ process([Call], #request{method = 'POST', data = Data, ip = {IP, _} = IPPort} =
     catch
         %% TODO We need to refactor to remove redundant error return formatting
         throw:{error, unknown_command} ->
-            {404, 40, <<"Command not found.">>};
+            json_format({404, 44, <<"Command not found.">>});
         _:{error,{_,invalid_json}} = _Err ->
             ?DEBUG("Bad Request: ~p", [_Err]),
             badrequest_response(<<"Invalid JSON input">>);