diff --git a/CHANGELOG.md b/CHANGELOG.md index 38c949ba..b4c12199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +- Add `EditedMessageIsTooLong` error [#109][pr109] + +[pr109]: https://github.com/teloxide/teloxide-core/pull/109 + ## 0.3.3 ### Fixed diff --git a/src/errors.rs b/src/errors.rs index c41822d5..7241dbb7 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -167,6 +167,22 @@ pub enum ApiError { #[serde(rename = "Bad Request: message is too long")] MessageIsTooLong, + /// Occurs when bot tries to edit a message with text size greater then + /// 4096 symbols. + /// + /// May happen in methods: + /// 1. [`EditMessageText`] + /// 2. [`EditMessageTextInline`] + /// 3. [`EditMessageCaption`] + /// 4. [`EditMessageCaptionInline`] + /// + /// [`EditMessageText`]: crate::payloads::EditMessageText + /// [`EditMessageTextInline`]: crate::payloads::EditMessageTextInline + /// [`EditMessageCaption`]: crate::payloads::EditMessageCaption + /// [`EditMessageCaptionInline`]: crate::payloads::EditMessageCaptionInline + #[serde(rename = "Bad Request: MESSAGE_TOO_LONG")] + EditedMessageIsTooLong, + /// Occurs when bot tries to send media group with more than 10 items. /// /// May happen in methods: