From e0d7837c0234f1be61f1ad1b0caff2ab19815ea9 Mon Sep 17 00:00:00 2001 From: Matthew Esposito Date: Tue, 24 Sep 2024 21:45:47 -0400 Subject: [PATCH] =?UTF-8?q?fix(client):=20don't=20catch=20network=20policy?= =?UTF-8?q?=20errors,=20since=20they=20indicate=20q=E2=80=A6=20(#259)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/client.rs b/src/client.rs index 72e6bae..fb84ae0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -300,12 +300,6 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo .await; }; - // Special condition rate limiting - https://github.com/redlib-org/redlib/issues/229 - if response.status() == StatusCode::FORBIDDEN && response.headers().get("retry-after").unwrap_or(&HeaderValue::from_static("0")).to_str().unwrap_or("0") == "0" { - force_refresh_token().await; - return Err("Rate limit - try refreshing soon".to_string()); - } - match response.headers().get(header::CONTENT_ENCODING) { // Content not compressed. None => Ok(response),