-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add Conflict error (HTTP error code 409) #1154
Conversation
hmm, Not to be blunt but why should we patch a user_error? I think the case in #1143 is too specific to add this feature.. |
The way I see it, is that telegram is returning a custom http error code, which we should handle on par with how we handle other 4xx error codes. Adding the conflicting id is just a quality of life type of improvement in my opinion. Doesn't really harm anything, but will probably make it easier to debug issues for some people. |
telegram/error.py
Outdated
|
||
class Conflict(TelegramError): | ||
def __init__(self, msg, url): | ||
match = re.search(r'bot(\d+):.*/', url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a comment on the code itself what is the input string and why it means a conflicting bot id? (in favour of future us who won't remember all the details...)
What's the status on this? We discussed it a few times. I seem to remember we decided not to add this except for the exception? |
Yes, exactly. @jsmnbom was on it. I thought it was already merged. |
Yes, I'm on it, will update the PR tomorrow when I have time :) |
Outdated + discussed in internal chat.
Fixes #1143.
Do we need tests for stuff like this?