diff options
author | Mickaël Rémond <mremond@process-one.net> | 2016-08-01 15:36:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-01 15:36:47 +0200 |
commit | 2ef58a33a9c3384429508bac60db8c322f4fc782 (patch) | |
tree | 5aaeefc8302746943c7f584ca16a95fce86e747e /src/ejabberd_commands.erl | |
parent | Remove compile warning (diff) | |
parent | Improve error message when try to call api on api root (diff) |
Merge pull request #1223 from processone/expand_api
More API fixes and improvements
Diffstat (limited to 'src/ejabberd_commands.erl')
-rw-r--r-- | src/ejabberd_commands.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 2c095440f..a8b3e25ab 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -425,7 +425,7 @@ get_command_definition(Name, Version) -> {V, C} end)))) of [{_, Command} | _ ] -> Command; - _E -> throw(unknown_command) + _E -> throw({error, unknown_command}) end. -spec get_commands_definition(integer()) -> [ejabberd_commands()]. @@ -682,7 +682,7 @@ check_auth(Command, {User, Server, {oauth, Token}, _}) -> case ejabberd_oauth:check_token(User, Server, ScopeList, Token) of true -> {ok, User, Server}; - false -> + _ -> throw({error, invalid_account_data}) end; check_auth(_Command, {User, Server, Password, _}) when is_binary(Password) -> |