Added new error types: PhotoDimensions, UnavailableMembers

This commit is contained in:
Alex Root Junior 2018-05-02 17:02:20 +03:00
parent 7df5337cb4
commit 0b48978bd3
2 changed files with 22 additions and 0 deletions

View file

@ -24,6 +24,9 @@ TelegramAPIError
ToMuchMessages
InvalidStickersSet
ChatAdminRequired
PhotoDimensions
UnavailableMembers
TypeOfFileMismatch
ConflictError
TerminatedByOtherGetUpdates
CantGetUpdates
@ -168,6 +171,19 @@ class ChatAdminRequired(BadRequest, _MatchErrorMixin):
text = 'Admin permissions is required!'
class PhotoDimensions(BadRequest, _MatchErrorMixin):
match = 'PHOTO_INVALID_DIMENSIONS'
text = 'Invalid photo dimensions'
class UnavailableMembers(BadRequest, _MatchErrorMixin):
match = 'supergroup members are unavailable'
class TypeOfFileMismatch(BadRequest, _MatchErrorMixin):
match = 'type of file mismatch'
class BadWebhook(BadRequest):
pass