diff options
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r-- | src/mod_http_api.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index bbd4a28de..c2b7d1100 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -279,6 +279,7 @@ handle2(Call, Auth, Args) when is_atom(Call), is_list(Args) -> 0 -> {200, <<"OK">>}; 1 -> {500, <<"500 Internal server error">>}; 400 -> {400, <<"400 Bad Request">>}; + 401 -> {401, <<"401 Unauthorized">>}; 404 -> {404, <<"404 Not found">>}; Res -> format_command_result(Call, Auth, Res) end. @@ -366,6 +367,7 @@ ejabberd_command(Auth, Cmd, Args, Default) -> end, case catch ejabberd_commands:execute_command(Access, Auth, Cmd, Args) of {'EXIT', _} -> Default; + {error, account_unprivileged} -> 401; {error, _} -> Default; Result -> Result end. |