bugsnag / bugsnag-python

Official BugSnag error monitoring and error reporting for django, flask, tornado and other python apps.
https://docs.bugsnag.com/platforms/python/
MIT License
86 stars 42 forks source link

Refactor caused by exceptions to match other platforms #309

Closed imjoehaines closed 2 years ago

imjoehaines commented 2 years ago

Goal

This PR refactors our implementation of caused by exceptions to match other platforms — the list of exceptions now lives on Event.errors and the original exception instance is now Event.original_error. For example, this matches JavaScript & Ruby

Event.exception and Event.stacktrace have been deprecated as they are somewhat ambiguous given there can be multiple exceptions with their own stacktraces

I've also fixed up our code to avoid triggering these deprecations internally and tidied up some tests that were leaking warnings