Fix deserialization of invalid token error

This commit is contained in:
Maybe Waffle 2023-02-01 17:12:33 +04:00
parent 6c6ae76dec
commit fc2b873c94

View file

@ -100,8 +100,9 @@ pub enum ApiError {
BotBlocked, BotBlocked,
/// Occurs when the bot token is incorrect. /// Occurs when the bot token is incorrect.
#[serde(rename = "Not Found")] // FIXME: rename this to something akin "InvalidToken"
#[error("Not Found")] #[serde(rename = "Unauthorized")]
#[error("Unauthorized")]
NotFound, NotFound,
/// Occurs when bot tries to modify a message without modification content. /// Occurs when bot tries to modify a message without modification content.