fix(client): don't catch network policy errors, since they indicate q… (#259)
This commit is contained in:
parent
2d6ac78acf
commit
e0d7837c02
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user