From 75e63fc5e3ca8a3246556efed4f5d9f3d5482fd8 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Sat, 23 Mar 2024 09:15:00 +0000 Subject: [PATCH] fix: need not retry HTTP status errors --- uplink/src/collector/downloader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uplink/src/collector/downloader.rs b/uplink/src/collector/downloader.rs index abe8e53c..0d2f0ef3 100644 --- a/uplink/src/collector/downloader.rs +++ b/uplink/src/collector/downloader.rs @@ -185,7 +185,7 @@ impl FileDownloader { loop { match self.download(req, &mut download).await { Ok(_) => break, - Err(Error::Reqwest(e)) => error!("Download failed: {e}"), + Err(Error::Reqwest(e)) if !e.is_status() => error!("Download failed: {e}"), Err(e) => return Err(e), } tokio::time::sleep(Duration::from_secs(1)).await;