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

@ -100,6 +100,12 @@ async def _check_result(method_name, response):
exceptions.InvalidStickersSet.throw()
elif exceptions.ChatAdminRequired.check(description):
exceptions.ChatAdminRequired.throw()
elif exceptions.PhotoDimensions.check(description):
exceptions.PhotoDimensions.throw()
elif exceptions.UnavailableMembers.check(description):
exceptions.UnavailableMembers.throw()
elif exceptions.TypeOfFileMismatch.check(description):
exceptions.TypeOfFileMismatch.throw()
raise exceptions.BadRequest(description)
elif response.status == HTTPStatus.NOT_FOUND:
if exceptions.MethodNotKnown.check(description):