Add debug for user settings request

This commit is contained in:
2024-04-14 23:02:56 +02:00
parent 14fea4c70e
commit 9b30f6efa8

View File

@@ -3,6 +3,7 @@ use serde_json::json;
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use smartstring::alias::String as SmartString; use smartstring::alias::String as SmartString;
use teloxide::types::{ChatId, UserId}; use teloxide::types::{ChatId, UserId};
use tracing::log;
use crate::{bots_manager::USER_LANGS_CACHE, config}; use crate::{bots_manager::USER_LANGS_CACHE, config};
@@ -54,7 +55,10 @@ pub async fn get_user_or_default_lang_codes(user_id: UserId) -> SmallVec<[SmartS
USER_LANGS_CACHE.insert(user_id, langs.clone()).await; USER_LANGS_CACHE.insert(user_id, langs.clone()).await;
langs langs
} }
Err(_) => default_lang_codes, Err(err) => {
log::error!("{:?}", err);
default_lang_codes
},
} }
} }