From 512284abf0ae33939a2efd5d9b83a3b3b7442a39 Mon Sep 17 00:00:00 2001 From: Robin Steuteville Date: Tue, 23 Jan 2024 16:01:03 -0700 Subject: [PATCH] adding 403 error to retry errors for fetch_github_list --- rust/fastsim-core/src/vehicle_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/src/vehicle_utils.rs b/rust/fastsim-core/src/vehicle_utils.rs index 9b9e471d..3c0bf498 100644 --- a/rust/fastsim-core/src/vehicle_utils.rs +++ b/rust/fastsim-core/src/vehicle_utils.rs @@ -1809,7 +1809,7 @@ const VEHICLE_REPO_LIST_URL: &'static str = fn get_response>(url: S) -> Result { for _ in 1..4 { match ureq::get(url.as_ref()).call() { - Err(Status(503, r)) | Err(Status(429, r)) => { + Err(Status(503, r)) | Err(Status(429, r)) | Err(Status(403, r)) => { let retry: Option = r.header("retry-after").and_then(|h| h.parse().ok()); let retry = retry.unwrap_or(5); eprintln!("{} for {}, retry in {}", r.status(), r.get_url(), retry);