mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
Add PhotoAsInputFileRequired exception. // Photo should be uploaded as an InputFile
This commit is contained in:
parent
b808c48789
commit
f0de1c5761
2 changed files with 6 additions and 0 deletions
|
|
@ -91,6 +91,8 @@ async def _check_result(method_name, response):
|
|||
exceptions.BadWebhookPort.throw()
|
||||
elif exceptions.CantParseUrl.check(description):
|
||||
exceptions.CantParseUrl.throw()
|
||||
elif exceptions.PhotoAsInputFileRequired.check(description):
|
||||
exceptions.PhotoAsInputFileRequired.throw()
|
||||
raise exceptions.BadRequest(description)
|
||||
elif response.status == HTTPStatus.NOT_FOUND:
|
||||
if exceptions.MethodNotKnown.check(description):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue