mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
Produce better error for http_api request with extra parameters
This commit is contained in:
parent
56baa07d48
commit
bbffd396f6
@ -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…
Reference in New Issue
Block a user