Skip to content

Commit e0cf0e8

Browse files
committed
Handle :unsampled events in sentry.send_test_event
Hey there! I tried to send a test event and got: ``` Sending test event... ** (CaseClauseError) no case clause matching: :unsampled (sentry 8.0.5) lib/mix/tasks/sentry.send_test_event.ex:57: Mix.Tasks.Sentry.SendTestEvent.maybe_send_event/0 (mix 1.11.4) lib/mix/task.ex:394: Mix.Task.run_task/3 (mix 1.11.4) lib/mix/cli.ex:84: Mix.CLI.run_task/2 (elixir 1.11.4) lib/code.ex:931: Code.require_file/2 ``` So I propose a clause be added to handle this case.
1 parent 5204d29 commit e0cf0e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/mix/tasks/sentry.send_test_event.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ defmodule Mix.Tasks.Sentry.SendTestEvent do
6363

6464
:excluded ->
6565
Mix.shell().info("No test event was sent because the event was excluded by a filter")
66+
67+
:unsampled ->
68+
Mix.shell().info(
69+
"No test event was sent because the event was excluded according to the sample_rate"
70+
)
6671
end
6772
else
6873
Mix.shell().info(

0 commit comments

Comments
 (0)