summaryrefslogtreecommitdiff
path: root/packages/frontend-shared
diff options
context:
space:
mode:
authorOutvi V <git@outv.im>2025-06-01 13:20:19 +0800
committerOutvi V <git@outv.im>2025-06-01 13:20:19 +0800
commit3f77cca7af76191cfd31694fc96199030cb18709 (patch)
treed8792a3fb3635447ad20b3feea43e6a5fb46f479 /packages/frontend-shared
parentfix: simplify the code (diff)
downloadsharkey-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.ts4
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;
}