feat: retry

This commit is contained in:
Nevo David 2025-08-14 12:07:01 +07:00
parent 7b8fa7fb7b
commit 3a5e0b1472
1 changed files with 3 additions and 2 deletions

View File

@ -109,16 +109,17 @@ export abstract class SocialAbstract {
json.includes('Rate limit')
) {
await timer(5000);
return this.fetch(url, options, identifier, totalRetries + 1);
return this.fetch(url, options, identifier, totalRetries + 1, ignoreConcurrency);
}
const handleError = this.handleErrors(json || '{}');
if (handleError?.type === 'retry') {
await timer(5000);
return this.fetch(url, options, identifier, totalRetries + 1);
return this.fetch(url, options, identifier, totalRetries + 1, ignoreConcurrency);
}
if (
request.status === 401 &&
(handleError?.type === 'refresh-token' || !handleError)