Merge pull request #828 from SummerGram/request_entity_too_large

Add `ApiError::RequestEntityTooLarge`
This commit is contained in:
Waffle Maybe 2023-01-31 19:15:17 +04:00 committed by GitHub
commit 4d250d6a05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -740,6 +740,18 @@ pub enum ApiError {
#[serde(rename = "Bad Request: invalid file id")]
#[error("Bad Request: invalid file id")]
FileIdInvalid,
/// Occurs when bot tries to upload a file which is larger than 50 MB using multipart/form-data.
///
/// May happen in methods:
/// 1. [`SendVideo`]
/// 2. [`SendDocument`]
///
/// [`SendVideo`]: crate::payloads::SendVideo
/// [`SendDocument`]: crate::payloads::SendDocument
#[serde(rename = "Request Entity Too Large")]
#[error("Request Entity Too Large")]
RequestEntityTooLarge,
/// Error which is not known to `teloxide`.
///