nextcloud / news-updater

:newspaper: Fast, parallel feed updater for the News app; written in Python
GNU General Public License v3.0
107 stars 23 forks source link

Better error message on failed update runner #34

Closed tohojo closed 3 years ago

tohojo commented 3 years ago

The feed update runner can fail for various reasons, most notably connection errors when receiving the feed URL. Currently, this will result in a Python exception being propagated to the main runner loop and will result in a not-so-useful traceback without any indication on what the error runner actually said when it failed.

To fix this, catch the CalledProcessError directly in the updater and turn it into a meaningful error message with the command output instead of a Python traceback. This gives both a more meaningful error message, and a cleaner output without Python tracebacks.