From 6f538545b49d371db9b9ad2a346563692479e587 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 28 Sep 2016 11:03:46 +0200 Subject: [PATCH] Fix 404 response formatting (thanks to Kaggggggga)(#1306) --- src/mod_http_api.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index dbca82375..7a95f8c6f 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -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">>);