Skip to content

Commit 0d49ce0

Browse files
committed
normalize potential non-elixir errors
1 parent c3dd1de commit 0d49ce0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sentry/plug_capture.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ defmodule Sentry.PlugCapture do
3838
super(conn, opts)
3939
rescue
4040
e in Plug.Conn.WrapperError ->
41-
Sentry.capture_exception(e.reason, stacktrace: e.stack, event_source: :plug)
41+
exception = Exception.normalize(:error, e.reason, e.stack)
42+
Sentry.capture_exception(exception, stacktrace: e.stack, event_source: :plug)
4243
Plug.Conn.WrapperError.reraise(e)
4344

4445
e ->

0 commit comments

Comments
 (0)