appsignal / appsignal-python

🟦 AppSignal for Python package
https://www.appsignal.com/
MIT License
6 stars 2 forks source link

Catch unexpected errors reading config file #196

Closed unflxw closed 8 months ago

unflxw commented 8 months ago

When reading the __appsignal__.py configuration file from the demo or diagnose command, handle unexpected errors in the file (e.g. syntax errors) instead of only handling the expected error of the appsignal variable being missing.

Unify the handling of errors when reading a config file. Provide an ExitError that can be raised by command helpers to trigger the command to exit.

Since loading the configuration file is only done by the diagnose and demo commands, move that functionality out of the Client file and into a helper for the CLI commands.

backlog-helper[bot] commented 8 months ago

Hi @unflxw,

We've found some issues with your Pull Request.


New issue guide | Backlog management | Rules | Feedback