mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Log errors on send_document
This commit is contained in:
@@ -129,14 +129,17 @@ async fn _send_downloaded_file(
|
|||||||
.into_async_read()
|
.into_async_read()
|
||||||
.compat();
|
.compat();
|
||||||
|
|
||||||
let document: InputFile = InputFile::read(data).file_name(filename);
|
let document: InputFile = InputFile::read(data).file_name(filename.clone());
|
||||||
|
|
||||||
match bot.send_document(message.chat.id, document)
|
match bot.send_document(message.chat.id, document)
|
||||||
.caption(caption)
|
.caption(caption)
|
||||||
.send()
|
.send()
|
||||||
.await {
|
.await {
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
Err(err) => return Err(Box::new(err)),
|
Err(err) => {
|
||||||
|
log::error!("Download error: {:?} | {:?}", filename, err);
|
||||||
|
return Err(Box::new(err));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match send_donation_notification(bot, message.clone()).await {
|
match send_donation_notification(bot, message.clone()).await {
|
||||||
|
|||||||
Reference in New Issue
Block a user