honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 25 forks source link

Report exception causes #111

Closed joshuap closed 2 years ago

joshuap commented 2 years ago

Python supports chaining exceptions, when an exception occurs while another exception is already being handled:

https://docs.python.org/3/library/exceptions.html#exception-context

Our /v1/notices spec defines the exception cause here.

Here's how our ruby gem collects and reports a chain of exception causes:

https://github.com/honeybadger-io/honeybadger-ruby/blob/bb19ded6e557e6e9713229d46ea5b891d2b6aeb3/lib/honeybadger/notice.rb#L198

https://github.com/honeybadger-io/honeybadger-ruby/blob/bb19ded6e557e6e9713229d46ea5b891d2b6aeb3/lib/honeybadger/notice.rb#L241