fix: retry on 429 status, handle episodes

This commit is contained in:
ThetaDev 2022-11-06 22:54:19 +01:00
parent 0bd742e836
commit 0101fc0c6b
3 changed files with 76 additions and 19 deletions

View file

@ -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) => {