{error, not_found}
end
catch
- exit:{attribute_not_found, _Attr, _} ->
+ exit:{attribute_not_found, _, _} ->
try get_attrs([user, server, password], AuthList) of
[U0, S0, P] ->
U = jid:nodeprep(U0),
{error, invalid_auth}
end
catch
- exit:{attribute_not_found, _Attr, _} ->
- #{}
+ exit:{attribute_not_found, Attr, _} ->
+ throw({error, missing_auth_arguments, Attr})
end
end.
{call, Method, Arguments})
catch
{error, missing_auth_arguments, _Attr} ->
- handler(State#state{get_auth = false, auth = noauth},
+ handler(State#state{get_auth = false,
+ auth = #{ip => IP, caller_module => ?MODULE}},
{call, Method, AllArgs})
end;
%% .............................