Infinity Polling Should Handle Exceptions #2378
All-The-Foxes
started this conversation in
Ideas
Replies: 3 comments 6 replies
-
You mean for async? |
Beta Was this translation helpful? Give feedback.
1 reply
-
By "not handled" in async, we refer to the fact that your exception handler did not handle this exception. This will not crush the code if you have non_stop set to True. |
Beta Was this translation helpful? Give feedback.
5 replies
-
To add to this, a full traceback for things like request timeouts just makes a mess in the logs. We don't need a traceback for Telegram server issues like bad gateways and such. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is wild to me that any error, including 429 and 401, is ignored during polling. Polling needs to break for 401 errors (unauthorized) and listen to 429 errors (too many requests). There shouldn't be any "unhandled exceptions" in the logs, let alone like 20 of them at once any time there is a bad gateway. Every exception, no matter what it is, should always be handled.
Beta Was this translation helpful? Give feedback.
All reactions