1
0
Fork 0
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:
Paweł Chmielowski 2019-01-30 16:35:06 +01:00
parent 56baa07d48
commit bbffd396f6

View file

@ -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},