retry on HTTP status 429 "Too Many Requests"
This commit is contained in:
parent
5e34c9705c
commit
d37b113d0d
|
@ -105,8 +105,10 @@ global API_METHODS
|
|||
}
|
||||
|
||||
function reportFailure(error) {
|
||||
// retry once if the error is 503 Service Unavailable
|
||||
if (error === 503 && !retrying.has(id)) {
|
||||
if ((
|
||||
error === 503 || // Service Unavailable
|
||||
error === 429 // Too Many Requests
|
||||
) && !retrying.has(id)) {
|
||||
retrying.add(id);
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user