This commit is contained in:
2024-05-09 21:39:56 +02:00
parent 3c8fdb35eb
commit a390a5aa8e
3 changed files with 10 additions and 3 deletions

View File

@@ -87,6 +87,7 @@ pub async fn download_file(
}))
}
pub async fn download_file_by_link(
filename: String,
link: String,

View File

@@ -66,8 +66,14 @@ pub async fn start_axum_server(stop_signal: Arc<AtomicBool>) {
match serde_json::from_str::<Update>(&input) {
Ok(mut update) => {
if let UpdateKind::Error(value) = &mut update.kind {
*value = serde_json::from_str(&input).unwrap_or_default();
if let UpdateKind::Error(_) = &mut update.kind {
log::warn!(
"Cannot parse an update.\nValue: {}\n\
This is a bug in teloxide-core, please open an issue here: \
https://github.com/teloxide/teloxide/issues.",
input
);
return StatusCode::OK;
}
if let Err(err) = tx.send(Ok(update)) {

View File

@@ -141,7 +141,7 @@ impl BotsManager {
if webhook_info.last_error_message.is_some() {
log::error!(
"Error getting webhook info: {:?}",
"Webhook last error: {:?}",
webhook_info.last_error_message
);