mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 19:42:11 +02:00
Produce better error for http_api request with extra parameters
This commit is contained in:
parent
56baa07d48
commit
bbffd396f6
1 changed files with 4 additions and 1 deletions
|
@ -357,7 +357,10 @@ format_args(Args, ArgsFormat) ->
|
|||
{Args, []}, ArgsFormat),
|
||||
case ArgsRemaining of
|
||||
[] -> R;
|
||||
L when is_list(L) -> exit({additional_unused_args, L})
|
||||
L when is_list(L) ->
|
||||
throw({invalid_parameter,
|
||||
io_lib:format("Request have unknown arguments: ~w",
|
||||
[[N || {N, _} <- L]])})
|
||||
end.
|
||||
|
||||
format_arg({Elements},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue