mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 03:50:15 +02:00
Make http_api command execution exception catcher log also command and args
This commit is contained in:
parent
cbac8a604a
commit
d085fff14b
1 changed files with 4 additions and 1 deletions
|
@ -306,7 +306,10 @@ handle(Call, Auth, Args, Version) when is_atom(Call), is_list(Args) ->
|
||||||
throw:Msg when is_list(Msg); is_binary(Msg) ->
|
throw:Msg when is_list(Msg); is_binary(Msg) ->
|
||||||
{400, iolist_to_binary(Msg)};
|
{400, iolist_to_binary(Msg)};
|
||||||
?EX_RULE(Class, Error, Stack) ->
|
?EX_RULE(Class, Error, Stack) ->
|
||||||
?ERROR_MSG("REST API Error: ~p:~p ~p", [Class, Error, ?EX_STACK(Stack)]),
|
?ERROR_MSG("REST API Error: "
|
||||||
|
"~s(~p) -> ~p:~p ~p",
|
||||||
|
[Call, hide_sensitive_args(Args),
|
||||||
|
Class, Error, ?EX_STACK(Stack)]),
|
||||||
{500, <<"internal_error">>}
|
{500, <<"internal_error">>}
|
||||||
end;
|
end;
|
||||||
{error, Msg} ->
|
{error, Msg} ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue