Problem
There is an unhandled MastodonNetworkError exception in the decorator function used for logging exceptions. This exception however is not exported by Mastodon.py and further investigation should be done to see how it can be caught and handled.
Reproducing
Currently, I am unsure how to reproduce this bug and I am not sure what caused it. It happened while MastoBot-3D was under light load with only a few pending mentions and 1 follow notification
Error
2023-07-25 21:16:11 2023-07-25 19:16:11,061 - [CRITICAL] - mastoBot.wrapper - MastodonNetworkError: Could not complete request: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2023-07-25 21:16:11 2023-07-25 19:16:11,064 - [CRITICAL] - mastoBot.wrapper - Error in function _process_notifications
2023-07-25 21:16:11 Traceback (most recent call last):
2023-07-25 21:16:11 File "/app/main.py", line 170, in <module>
2023-07-25 21:16:11 bot.run()
2023-07-25 21:16:11 File "/usr/local/lib/python3.9/site-packages/mastoBot/mastoBot.py", line 118, in run
2023-07-25 21:16:11 self._process_notifications(notifications)
2023-07-25 21:16:11 File "/usr/local/lib/python3.9/site-packages/mastoBot/mastoBot.py", line 43, in wrapper
2023-07-25 21:16:11 raise e
2023-07-25 21:16:11 File "/usr/local/lib/python3.9/site-packages/mastoBot/mastoBot.py", line 23, in wrapper
2023-07-25 21:16:11 result = func(self, *args, **kwargs)
2023-07-25 21:16:11 File "/usr/local/lib/python3.9/site-packages/mastoBot/mastoBot.py", line 129, in _process_notifications
2023-07-25 21:16:11 for notification in notifications:
2023-07-25 21:16:11 TypeError: 'NoneType' object is not iterable
Problem
There is an unhandled MastodonNetworkError exception in the
decoratorfunction used for logging exceptions. This exception however is not exported byMastodon.pyand further investigation should be done to see how it can be caught and handled.Reproducing
Currently, I am unsure how to reproduce this bug and I am not sure what caused it. It happened while
MastoBot-3Dwas under light load with only a few pendingmentionsand 1follownotificationError