From 1059e3ee99fe4afa5f6da450f231048d11640a75 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:09:51 -0400 Subject: [PATCH] chore(cli): add more WARN logging before we retry a download --- crates/cli/commands/src/download/mod.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/crates/cli/commands/src/download/mod.rs b/crates/cli/commands/src/download/mod.rs index 17a1cf7f706..49998b53387 100644 --- a/crates/cli/commands/src/download/mod.rs +++ b/crates/cli/commands/src/download/mod.rs @@ -1328,7 +1328,17 @@ fn streaming_download_and_extract( let response = match client.get(url).send().and_then(|r| r.error_for_status()) { Ok(r) => r, Err(e) => { - last_error = Some(e.into()); + let err = eyre::Error::from(e); + if attempt < MAX_DOWNLOAD_RETRIES { + warn!(target: "reth::cli", + url = %url, + attempt, + max = MAX_DOWNLOAD_RETRIES, + err = %err, + "Streaming request failed, retrying" + ); + } + last_error = Some(err); if attempt < MAX_DOWNLOAD_RETRIES { std::thread::sleep(Duration::from_secs(RETRY_BACKOFF_SECS)); } @@ -1355,6 +1365,15 @@ fn streaming_download_and_extract( match result { Ok(()) => return Ok(()), Err(e) => { + if attempt < MAX_DOWNLOAD_RETRIES { + warn!(target: "reth::cli", + url = %url, + attempt, + max = MAX_DOWNLOAD_RETRIES, + err = %e, + "Streaming extraction failed, retrying" + ); + } last_error = Some(e); if attempt < MAX_DOWNLOAD_RETRIES { std::thread::sleep(Duration::from_secs(RETRY_BACKOFF_SECS));