Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled MastodonNetworkError in MastoBot #3

Open
e-dreyer opened this issue Jul 25, 2023 · 1 comment
Open

Unhandled MastodonNetworkError in MastoBot #3

e-dreyer opened this issue Jul 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@e-dreyer
Copy link
Owner

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
@e-dreyer e-dreyer self-assigned this Jul 25, 2023
@e-dreyer e-dreyer added the bug Something isn't working label Jul 25, 2023
@e-dreyer
Copy link
Owner Author

This relates well with #4 that a good storage, queuing and caching solution is required.

@e-dreyer e-dreyer removed their assignment Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant