mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Descriptions of errors.
This commit is contained in:
parent
f0de1c5761
commit
967dbdaad3
1 changed files with 13 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ TelegramAPIError
|
|||
CantParseUrl
|
||||
NotFound
|
||||
MethodNotKnown
|
||||
PhotoAsInputFileRequired
|
||||
ConflictError
|
||||
TerminatedByOtherGetUpdates
|
||||
CantGetUpdates
|
||||
|
|
@ -89,14 +90,23 @@ class MessageError(BadRequest):
|
|||
|
||||
|
||||
class MessageNotModified(MessageError, _MatchErrorMixin):
|
||||
"""
|
||||
Will be raised when you try to set new text is equals to current text.
|
||||
"""
|
||||
match = 'message is not modified'
|
||||
|
||||
|
||||
class MessageToForwardNotFound(MessageError, _MatchErrorMixin):
|
||||
"""
|
||||
Will be raised when you try to forward very old or deleted or unknown message.
|
||||
"""
|
||||
match = 'message to forward not found'
|
||||
|
||||
|
||||
class MessageToDeleteNotFound(MessageError, _MatchErrorMixin):
|
||||
"""
|
||||
Will be raised when you try to delete very old or deleted or unknown message.
|
||||
"""
|
||||
match = 'message to delete not found'
|
||||
|
||||
|
||||
|
|
@ -131,6 +141,9 @@ class GroupDeactivated(BadRequest, _MatchErrorMixin):
|
|||
|
||||
|
||||
class PhotoAsInputFileRequired(BadRequest, _MatchErrorMixin):
|
||||
"""
|
||||
Will be raised when you try to set chat photo from file ID.
|
||||
"""
|
||||
match = 'Photo should be uploaded as an InputFile'
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue