Add WrongFileIdOrUrl and FailedToGetUrlContent errors

This commit is contained in:
Maybe Waffle 2022-03-16 21:09:47 +04:00
parent 7437a8c4a8
commit d8e3c6ce42
2 changed files with 18 additions and 0 deletions

View file

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased
### Added
- `WrongFileIdOrUrl` and `FailedToGetUrlContent` errors ([#188][pr188])
[pr188]: https://github.com/teloxide/teloxide-core/pull/188
## 0.4.3 - 2022-03-08
### Added

View file

@ -406,6 +406,18 @@ pub enum ApiError {
#[error("Bad Request: wrong file id")]
WrongFileId,
/// Occurs when bot tries to send files with wrong file identifier or HTTP
/// url
#[serde(rename = "Bad Request: wrong file identifier/HTTP URL specified")]
#[error("Bad Request: wrong file identifier/HTTP URL specified")]
WrongFileIdOrUrl,
/// Occurs when When sending files with an url to a site that doesn't
/// respond.
#[serde(rename = "Bad Request: failed to get HTTP URL content")]
#[error("Bad Request: failed to get HTTP URL content")]
FailedToGetUrlContent,
/// Occurs when bot tries to do some with group which was deactivated.
#[serde(rename = "Bad Request: group is deactivated")]
#[error("Bad Request: group is deactivated")]