diff --git a/aiogram/bot/api.py b/aiogram/bot/api.py index 123c5359..4ef89d68 100644 --- a/aiogram/bot/api.py +++ b/aiogram/bot/api.py @@ -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: