fix: retry on 429 status, handle episodes
This commit is contained in:
parent
0bd742e836
commit
0101fc0c6b
3 changed files with 76 additions and 19 deletions
|
|
@ -492,10 +492,9 @@ impl RustyPipe {
|
|||
Ok(response) => {
|
||||
let status = response.status();
|
||||
// Immediately return in case of success or unrecoverable status code
|
||||
if status.is_success() || !status.is_server_error() {
|
||||
if status.is_success() || (!status.is_server_error() && status != 429) {
|
||||
return res;
|
||||
}
|
||||
// TODO: handle 429 (captcha)
|
||||
status.to_string()
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
|
|||
Reference in a new issue