mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +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
|
CantParseUrl
|
||||||
NotFound
|
NotFound
|
||||||
MethodNotKnown
|
MethodNotKnown
|
||||||
|
PhotoAsInputFileRequired
|
||||||
ConflictError
|
ConflictError
|
||||||
TerminatedByOtherGetUpdates
|
TerminatedByOtherGetUpdates
|
||||||
CantGetUpdates
|
CantGetUpdates
|
||||||
|
|
@ -89,14 +90,23 @@ class MessageError(BadRequest):
|
||||||
|
|
||||||
|
|
||||||
class MessageNotModified(MessageError, _MatchErrorMixin):
|
class MessageNotModified(MessageError, _MatchErrorMixin):
|
||||||
|
"""
|
||||||
|
Will be raised when you try to set new text is equals to current text.
|
||||||
|
"""
|
||||||
match = 'message is not modified'
|
match = 'message is not modified'
|
||||||
|
|
||||||
|
|
||||||
class MessageToForwardNotFound(MessageError, _MatchErrorMixin):
|
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'
|
match = 'message to forward not found'
|
||||||
|
|
||||||
|
|
||||||
class MessageToDeleteNotFound(MessageError, _MatchErrorMixin):
|
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'
|
match = 'message to delete not found'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -131,6 +141,9 @@ class GroupDeactivated(BadRequest, _MatchErrorMixin):
|
||||||
|
|
||||||
|
|
||||||
class PhotoAsInputFileRequired(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'
|
match = 'Photo should be uploaded as an InputFile'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue