mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-16 20:50:25 +00:00
Handle rejected TOO_MANY_REQUESTS
This commit is contained in:
parent
a516461df6
commit
d22d1888f1
1 changed files with 5 additions and 0 deletions
|
|
@ -94,6 +94,11 @@ impl RetryExt for http::Error {
|
|||
|
||||
impl RetryExt for ErrorKind {
|
||||
fn should_retry(&self) -> bool {
|
||||
match self {
|
||||
Self::RejectedStatusCode(StatusCode::TOO_MANY_REQUESTS) => return true,
|
||||
_ => {}
|
||||
};
|
||||
|
||||
// If the error is a `reqwest::Error`, delegate to that
|
||||
if let Some(r) = self.reqwest_error() {
|
||||
r.should_retry()
|
||||
|
|
|
|||
Loading…
Reference in a new issue