Reduced connection timeouts and added some logging

This commit is contained in:
Neshura 2024-05-06 22:21:04 +02:00
parent 22bbaaa002
commit cd78d3c1c7
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
3 changed files with 6 additions and 4 deletions

View file

@ -215,7 +215,7 @@ impl Lemmy {
match serde_json::from_str::<T>(response) {
Ok(data) => Ok(data),
Err(e) => {
let err_msg = format!("{e}");
let err_msg = format!("{e} while parsing JSON");
error!(err_msg);
Err(())
}
@ -226,7 +226,7 @@ impl Lemmy {
match serde_json::from_str::<HashMap<&str, T>>(response) {
Ok(mut data) => Ok(data.remove("post_view").expect("Element should be present")),
Err(e) => {
let err_msg = format!("{e}");
let err_msg = format!("{e} while parsing JSON HashMap");
error!(err_msg);
Err(())
}