fix(account): add retry and rate-limit backoff handling for API requests

This commit is contained in:
2026-03-28 10:42:47 +00:00
parent d27d5e3537
commit e73bc44277
4 changed files with 46 additions and 12 deletions

View File

@@ -20,6 +20,9 @@ export async function autoPaginate<T>(
const all: T[] = [];
let offset = 0;
while (true) {
if (offset > 0) {
await new Promise((r) => setTimeout(r, 100));
}
const result = await fetchPage(offset, count);
all.push(...result.data);
offset += count;