mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Add InvalidStickersSet exception
This commit is contained in:
parent
bcb629cf9a
commit
e07115a09f
2 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ async def _check_result(method_name, response):
|
||||||
exceptions.PhotoAsInputFileRequired.throw()
|
exceptions.PhotoAsInputFileRequired.throw()
|
||||||
elif exceptions.ToMuchMessages.check(description):
|
elif exceptions.ToMuchMessages.check(description):
|
||||||
exceptions.ToMuchMessages.throw()
|
exceptions.ToMuchMessages.throw()
|
||||||
|
elif exceptions.InvalidStickersSet.check(description):
|
||||||
|
exceptions.InvalidStickersSet.throw()
|
||||||
raise exceptions.BadRequest(description)
|
raise exceptions.BadRequest(description)
|
||||||
elif response.status == HTTPStatus.NOT_FOUND:
|
elif response.status == HTTPStatus.NOT_FOUND:
|
||||||
if exceptions.MethodNotKnown.check(description):
|
if exceptions.MethodNotKnown.check(description):
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ TelegramAPIError
|
||||||
MethodNotKnown
|
MethodNotKnown
|
||||||
PhotoAsInputFileRequired
|
PhotoAsInputFileRequired
|
||||||
ToMuchMessages
|
ToMuchMessages
|
||||||
|
InvalidStickersSet
|
||||||
ConflictError
|
ConflictError
|
||||||
TerminatedByOtherGetUpdates
|
TerminatedByOtherGetUpdates
|
||||||
CantGetUpdates
|
CantGetUpdates
|
||||||
|
|
@ -156,6 +157,11 @@ class ToMuchMessages(BadRequest, _MatchErrorMixin):
|
||||||
match = 'Too much messages to send as an album'
|
match = 'Too much messages to send as an album'
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidStickersSet(BadRequest, _MatchErrorMixin):
|
||||||
|
match = 'STICKERSET_INVALID'
|
||||||
|
text = 'Stickers set is invalid'
|
||||||
|
|
||||||
|
|
||||||
class BadWebhook(BadRequest):
|
class BadWebhook(BadRequest):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue