diff options
| author | Outvi V <git@outv.im> | 2025-06-01 13:20:19 +0800 |
|---|---|---|
| committer | Outvi V <git@outv.im> | 2025-06-01 13:20:19 +0800 |
| commit | 3f77cca7af76191cfd31694fc96199030cb18709 (patch) | |
| tree | d8792a3fb3635447ad20b3feea43e6a5fb46f479 /packages/frontend-shared | |
| parent | fix: simplify the code (diff) | |
| download | sharkey-3f77cca7af76191cfd31694fc96199030cb18709.tar.gz sharkey-3f77cca7af76191cfd31694fc96199030cb18709.tar.bz2 sharkey-3f77cca7af76191cfd31694fc96199030cb18709.zip | |
chore: lint
Diffstat (limited to 'packages/frontend-shared')
| -rw-r--r-- | packages/frontend-shared/js/retry-on-throttled.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend-shared/js/retry-on-throttled.ts b/packages/frontend-shared/js/retry-on-throttled.ts index 37a7f40c73..962a067e29 100644 --- a/packages/frontend-shared/js/retry-on-throttled.ts +++ b/packages/frontend-shared/js/retry-on-throttled.ts @@ -13,9 +13,9 @@ export async function retryOnThrottled<T>(f: () => Promise<T>, retryCount = 5): return await f(); } catch (err) { // RATE_LIMIT_EXCEEDED - if (err?.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') { + if ((err as T)?.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') { lastError = err; - await sleep(err?.info?.fullResetMs ?? 1000); + await sleep((err as T)?.info?.fullResetMs ?? 1000); } else { throw err; } |