mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Wow. Fail. Wrong method name.
This commit is contained in:
parent
15c85c53db
commit
ca3aa504cf
1 changed files with 5 additions and 5 deletions
|
|
@ -99,17 +99,17 @@ async def _check_result(method_name, response):
|
|||
exceptions.MethodNotKnown.throw()
|
||||
raise exceptions.NotFound(description)
|
||||
elif response.status == HTTPStatus.CONFLICT:
|
||||
if exceptions.TerminatedByOtherGetUpdates.match(description):
|
||||
if exceptions.TerminatedByOtherGetUpdates.check(description):
|
||||
exceptions.TerminatedByOtherGetUpdates.throw()
|
||||
if exceptions.CantGetUpdates.match(description):
|
||||
if exceptions.CantGetUpdates.check(description):
|
||||
exceptions.CantGetUpdates.throw()
|
||||
raise exceptions.ConflictError(description)
|
||||
elif response.status in [HTTPStatus.UNAUTHORIZED, HTTPStatus.FORBIDDEN]:
|
||||
if exceptions.BotKicked.match(description):
|
||||
if exceptions.BotKicked.check(description):
|
||||
exceptions.BotKicked.throw()
|
||||
elif exceptions.BotBlocked.match(description):
|
||||
elif exceptions.BotBlocked.check(description):
|
||||
exceptions.BotBlocked.throw()
|
||||
elif exceptions.UserDeactivated.match(description):
|
||||
elif exceptions.UserDeactivated.check(description):
|
||||
exceptions.UserDeactivated.throw()
|
||||
raise exceptions.Unauthorized(description)
|
||||
elif response.status == HTTPStatus.REQUEST_ENTITY_TOO_LARGE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue