We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d14e866 commit b5b7bccCopy full SHA for b5b7bcc
lib/mix/tasks/sentry.send_test_event.ex
@@ -43,11 +43,17 @@ defmodule Mix.Tasks.Sentry.SendTestEvent do
43
if env_name in included_envs do
44
Mix.shell.info "Sending test event..."
45
46
- {:ok, id} = "Testing sending Sentry event"
+ result = "Testing sending Sentry event"
47
|> RuntimeError.exception
48
|> Sentry.capture_exception(result: :sync)
49
50
- Mix.shell.info "Test event sent! Event ID: #{id}"
+ case result do
51
+ {:ok, id} ->
52
+ Mix.shell.info "Test event sent! Event ID: #{id}"
53
+ :excluded ->
54
+ Mix.shell.info "No test event was sent because the event was excluded by a filter"
55
+ end
56
+
57
else
58
Mix.shell.info "#{inspect env_name} is not in #{inspect included_envs} so no test event will be sent"
59
end
0 commit comments