mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 13:04:34 +00:00
chore: add per comments
This commit is contained in:
parent
66e9e25dda
commit
909239bbe5
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export async function retryOnThrottled<T>(f: () => Promise<T>, retryCount = 5):
|
||||||
return await f();
|
return await f();
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
// RATE_LIMIT_EXCEEDED
|
// RATE_LIMIT_EXCEEDED
|
||||||
if (err?.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') {
|
if (typeof err === 'object' && err?.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') {
|
||||||
lastError = err;
|
lastError = err;
|
||||||
await sleep(err?.info?.fullResetMs ?? 1000);
|
await sleep(err?.info?.fullResetMs ?? 1000);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue