honeybadger-io / honeybadger-python

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

fix: fastapi dependency issue. #88

Closed stefanondisponibile closed 3 years ago

stefanondisponibile commented 3 years ago

Hello, I just noticed that with #84 I introduced a dependency issue with fastapi preventing the correct initialization of Honeybadger.

This was caused by the auto_discover_plugins functionality importing the contrib package, and therefore raising an error when fastapi is not installed in your environment.

This pull request fixes that issue, and requires explicitly importing the HoneybadgerRoute for the "advanced" apiRoute usage in FastAPI.

(The tests completed successfully because fastapi is a dependency in the test environment).

What do you think? Does this makes sense to you, @Kelvin4664 ?

Thank you!

Kelvin4664 commented 3 years ago

Thanks! LGTM.