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

errors: fix regular expression #294

Merged
merged 2 commits into from
May 18, 2020
Merged

errors: fix regular expression #294

merged 2 commits into from
May 18, 2020

Conversation

aofei
Copy link
Contributor

@aofei aofei commented May 18, 2020

Telegram Bot API now returns an extra field for error responses, such as:

{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 8","parameters":{"retry_after":8}}

This means that existing regular expression cannot extract errors normally, so it will cause panic.

Telegram Bot API now returns an extra field for error responses, such
as: {"ok":false,"error_code":429,"description":"Too Many Requests: retry
after 8","parameters":{"retry_after":8}}
@demget
Copy link
Collaborator

demget commented May 18, 2020

We have similar #283, but no approved tests. Can you provide some so I will be able to merge your pull request?

@aofei
Copy link
Contributor Author

aofei commented May 18, 2020

Sorry, my bad. I forgot to check the PR list, these two PRs are basically the same. 😅

Anyway, I added tests. And I think this is a problem that needs to be fixed ASAP, it caused too many panics.

@demget
Copy link
Collaborator

demget commented May 18, 2020

According to the contribution guide, you should change a base branch to develop

@aofei aofei changed the base branch from v2 to develop May 18, 2020 18:45
@aofei
Copy link
Contributor Author

aofei commented May 18, 2020

According to the contribution guide, you should change a base branch to develop

Done.

@demget demget merged commit fa41701 into tucnak:develop May 18, 2020
@demget
Copy link
Collaborator

demget commented May 18, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants