Skip to content

Commit 3a28a27

Browse files
committed
dialyzer
1 parent adc99cf commit 3a28a27

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

lib/sentry/client_report/sender.ex

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,27 @@ defmodule Sentry.ClientReport.Sender do
5555

5656
@impl true
5757
def handle_info(:send_report, state) do
58-
if map_size(state) != 0 and Config.dsn() != nil and Config.send_client_reports?() do
59-
client_report =
60-
%ClientReport{
61-
timestamp:
62-
DateTime.utc_now()
63-
|> DateTime.truncate(:second)
64-
|> DateTime.to_iso8601()
65-
|> String.trim_trailing("Z"),
66-
discarded_events:
67-
Enum.map(state, fn {{reason, category}, quantity} ->
68-
%{
69-
reason: reason,
70-
category: category,
71-
quantity: quantity
72-
}
73-
end)
74-
}
58+
_ =
59+
if map_size(state) != 0 and Config.dsn() != nil and Config.send_client_reports?() do
60+
client_report =
61+
%ClientReport{
62+
timestamp:
63+
DateTime.utc_now()
64+
|> DateTime.truncate(:second)
65+
|> DateTime.to_iso8601()
66+
|> String.trim_trailing("Z"),
67+
discarded_events:
68+
Enum.map(state, fn {{reason, category}, quantity} ->
69+
%{
70+
reason: reason,
71+
category: category,
72+
quantity: quantity
73+
}
74+
end)
75+
}
7576

76-
Client.send_client_report(client_report)
77-
end
77+
Client.send_client_report(client_report)
78+
end
7879

7980
schedule_report()
8081
{:noreply, %{}}

0 commit comments

Comments
 (0)