Add more info when send fail (not just status)

This commit is contained in:
Charlène Benke
2026-04-20 14:55:48 +02:00
parent b29c6ea9ff
commit da79916396
+5 -2
View File
@@ -54,11 +54,14 @@ pub async fn send_batch_request(
); );
} }
Ok(res) => { Ok(res) => {
let status = res.status();
let error_body = res.text().await.unwrap_or_default();
eprintln!( eprintln!(
" {} Failed to send to [{}]. Status: {}", " {} Failed to send to [{}]. Status: {}\n Server error: {}",
style("").red(), style("").red(),
folder, folder,
res.status() status,
error_body
); );
} }
Err(e) => { Err(e) => {