getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

Use correct kwarg in handle_exception() for Flask #1300

Closed ltm closed 6 years ago

ltm commented 6 years ago

The handle_exception() method is registered as a receiver of the got_request_exception signal. According to both the documentation and source code of Flask the got_request_exception signal passes the exception as exception rather than a exc_info.

This is likely to have gone unnoticed since captureException() calls sys.exc_info() in the absence of an exception.

On Python 3 we can use __traceback__ to explicitly construct the exc_info.

untitaker commented 6 years ago

thanks!