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,
/// Occurs when the bot token is incorrect.
#[serde(rename = "Not Found")]
#[error("Not Found")]
// FIXME: rename this to something akin "InvalidToken"
#[serde(rename = "Unauthorized")]
#[error("Unauthorized")]
NotFound,
/// Occurs when bot tries to modify a message without modification content.