Fixed error messages

This commit is contained in:
StNicolay 2024-02-11 12:12:14 +03:00
parent 40515c463a
commit 8979cc5b25
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D
2 changed files with 6 additions and 7 deletions

8
Cargo.lock generated
View File

@ -29,9 +29,9 @@ dependencies = [
[[package]] [[package]]
name = "ahash" name = "ahash"
version = "0.8.7" version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"getrandom", "getrandom",
@ -215,9 +215,9 @@ dependencies = [
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.33" version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
dependencies = [ dependencies = [
"num-traits", "num-traits",
] ]

View File

@ -141,12 +141,11 @@ async fn user_from_document(
Err(text) => return Err(Cow::Borrowed(text)), Err(text) => return Err(Cow::Borrowed(text)),
}; };
let data = let data = download_file(bot, file).map_err(|_| "Error downloading the file. Try again");
download_file(bot, file).map_err(|_| "Error getting existing account names. Try again");
let existing_names = Account::get_names(user_id, db) let existing_names = Account::get_names(user_id, db)
.try_collect() .try_collect()
.map_err(|_| "Error downloading the file. Try again"); .map_err(|_| "Error getting existing account names. Try again");
try_join!(data, existing_names)? try_join!(data, existing_names)?
}; };