This commit is contained in:
Drew 2026-02-24 11:01:07 -08:00
parent 05176c7742
commit 81322c7256
7 changed files with 25 additions and 22 deletions

View file

@ -154,7 +154,10 @@ async fn run_stream(
if !response.status().is_success() {
let status = response.status();
let body_text = response.text().await.unwrap_or_default();
let body_text = match response.text().await {
Ok(t) => t,
Err(e) => format!("(failed to read error body: {e})"),
};
let _ = tx
.send(StreamEvent::Error(format!("HTTP {status}: {body_text}")))
.await;