feat: try again on 500
This commit is contained in:
parent
3e5e7bd4ba
commit
473e92ada2
|
|
@ -75,8 +75,7 @@ export abstract class SocialAbstract {
|
|||
json = '{}';
|
||||
}
|
||||
|
||||
console.log(json);
|
||||
if (json.includes('rate_limit_exceeded') || json.includes('Rate limit')) {
|
||||
if (request.status === 500 || json.includes('rate_limit_exceeded') || json.includes('Rate limit')) {
|
||||
await timer(5000);
|
||||
console.log('rate limit trying again');
|
||||
return this.fetch(url, options, identifier, totalRetries + 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue