mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
new: add exceptions (#427)
* new: add FileIsTooBig exception * new: add MessageCantBeForwarded exception
This commit is contained in:
parent
7b33e5c68a
commit
41c104bb57
1 changed files with 10 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
- MessageTextIsEmpty
|
||||
- MessageCantBeEdited
|
||||
- MessageCantBeDeleted
|
||||
- MessageCantBeForwarded
|
||||
- MessageToEditNotFound
|
||||
- MessageToReplyNotFound
|
||||
- ToMuchMessages
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
- URLHostIsEmpty
|
||||
- StartParamInvalid
|
||||
- ButtonDataInvalid
|
||||
- FileIsTooBig
|
||||
- WrongFileIdentifier
|
||||
- GroupDeactivated
|
||||
- BadWebhook
|
||||
|
|
@ -213,6 +215,10 @@ class MessageCantBeDeleted(MessageError):
|
|||
match = 'message can\'t be deleted'
|
||||
|
||||
|
||||
class MessageCantBeForwarded(MessageError):
|
||||
match = 'message can\'t be forwarded'
|
||||
|
||||
|
||||
class MessageToEditNotFound(MessageError):
|
||||
match = 'message to edit not found'
|
||||
|
||||
|
|
@ -347,6 +353,10 @@ class ButtonDataInvalid(BadRequest):
|
|||
text = 'Button data invalid'
|
||||
|
||||
|
||||
class FileIsTooBig(BadRequest):
|
||||
match = 'File is too big'
|
||||
|
||||
|
||||
class WrongFileIdentifier(BadRequest):
|
||||
match = 'wrong file identifier/HTTP URL specified'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue