mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Fix 404 response formatting (thanks to Kaggggggga)(#1306)
This commit is contained in:
parent
d4b4f35a0e
commit
6f538545b4
@ -226,7 +226,7 @@ process([Call], #request{method = 'POST', data = Data, ip = {IP, _} = IPPort} =
|
|||||||
catch
|
catch
|
||||||
%% TODO We need to refactor to remove redundant error return formatting
|
%% TODO We need to refactor to remove redundant error return formatting
|
||||||
throw:{error, unknown_command} ->
|
throw:{error, unknown_command} ->
|
||||||
{404, 40, <<"Command not found.">>};
|
json_format({404, 44, <<"Command not found.">>});
|
||||||
_:{error,{_,invalid_json}} = _Err ->
|
_:{error,{_,invalid_json}} = _Err ->
|
||||||
?DEBUG("Bad Request: ~p", [_Err]),
|
?DEBUG("Bad Request: ~p", [_Err]),
|
||||||
badrequest_response(<<"Invalid JSON input">>);
|
badrequest_response(<<"Invalid JSON input">>);
|
||||||
|
Loading…
Reference in New Issue
Block a user