Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2019-01-30 18:35:06 +0300
committerPaweł Chmielowski <pchmielowski@process-one.net>2019-01-30 18:35:06 +0300
commitbbffd396f622fbc598a904531f980c960ad51e20 (patch)
treebcb660fcd275fd135cbadd6083f245a81f0e367b /src/mod_http_api.erl
parent56baa07d486f68fc5275d830837bdd918680d28b (diff)
Produce better error for http_api request with extra parameters
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index 7a4c73315..8cc80982a 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -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},