Merge pull request #825 from teloxide/image_process_failed_error

Add `ApiError::ImageProcessFailed`
This commit is contained in:
Waffle Maybe 2023-02-03 14:19:07 +04:00 committed by GitHub
commit 6c6ae76dec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,6 +456,14 @@ pub enum ApiError {
#[error("Bad Request: group is deactivated")]
GroupDeactivated,
/// Occurs when image processing fails on telegram's side.
///
/// This is likely caused by an incorrectly encoded image, make sure that
/// the image is correctly encoded in a format telegram accepts.
#[serde(rename = "Bad Request: IMAGE_PROCESS_FAILED")]
#[error("Bad Request: IMAGE_PROCESS_FAILED")]
ImageProcessFailed,
/// Occurs when bot tries to set chat photo from file ID
///
/// May happen in methods: