aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickael Remond <mremond@process-one.net>2016-08-01 08:58:49 +0200
committerMickael Remond <mremond@process-one.net>2016-08-01 08:58:49 +0200
commitc5c394e929d508a0b04efcae6abc696c142d0802 (patch)
treedcef0aeccf11c3644622b019e187e1e1c6c13a68
parentImprove error handling (diff)
Fix HTTP process return formatting
-rw-r--r--src/mod_http_api.erl2
1 files changed, 1 insertions, 1 deletions
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()]),