Skip to content

Commit

Permalink
Improve logs and ensure update (#909)
Browse files Browse the repository at this point in the history
For #900
  • Loading branch information
Andrés Atencio authored May 12, 2022
1 parent f6229be commit 7ac6369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions broker/src/session/session.erl
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ finalize({failed, Reason}, State = #state{session = Session = #session{call_log
"queued"
end
end,
lager:info("Call failed with reason ~p", [Reason]),
lager:info("Call failed with reason ~p and new state ~p", [Reason, NewState]),
FailInfo = case Reason of
hangup -> [{fail_reason, "hangup"}];
busy -> [{fail_reason, "busy"}];
Expand All @@ -496,7 +496,7 @@ finalize({failed, Reason}, State = #state{session = Session = #session{call_log
{internal_error, Details} -> [{fail_reason, "internal error"}, {fail_details, io_lib:format("~p", [Details])}];
_ -> [{fail_reason, "unknown error"}]
end,
CallLog:update([{state, NewState}, {finished_at, calendar:universal_time()}] ++ FailInfo),
ok = CallLog:update([{state, NewState}, {finished_at, calendar:universal_time()}] ++ FailInfo),
StopReason = case Reason of
{error, ErrDetails2} -> ErrDetails2;
{error, ErrDetails2, _} -> ErrDetails2;
Expand Down

0 comments on commit 7ac6369

Please sign in to comment.