Skip to content

Commit faac6c3

Browse files
committed
Fixes dialyzer warning when using the Sentry.Phoenix.Endpoint macro
When using the Sentry.Phoenix.Endpoint on a Phoenix project with Dialyzer, set with the :unmatched_return flag, Dialyzer will complain with a '../endpoint.ex:1:umatched_return', with the expectation of the 'send_result' type signature.
1 parent 3a26043 commit faac6c3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/sentry/phoenix_endpoint.ex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ defmodule Sentry.Phoenix.Endpoint do
3636
request = Sentry.Plug.build_request_interface_data(conn, [])
3737
exception = Exception.normalize(kind, reason, stacktrace)
3838

39-
Sentry.capture_exception(
40-
exception,
41-
stacktrace: stacktrace,
42-
request: request,
43-
event_source: :endpoint,
44-
error_type: kind
45-
)
39+
_ =
40+
Sentry.capture_exception(
41+
exception,
42+
stacktrace: stacktrace,
43+
request: request,
44+
event_source: :endpoint,
45+
error_type: kind
46+
)
4647

4748
:erlang.raise(kind, reason, stacktrace)
4849
end

0 commit comments

Comments
 (0)