Running a script to update custom attributes for 2,000 users using PATCH /api/v2/users/{id}. We hit 429 Too Many Requests after about 150 calls. The retry logic uses exponential backoff, but it keeps failing. Here’s the fetch wrapper: const res = await fetch(url, { method: 'PATCH', headers: { 'Content-Type': 'application/json', 'Authorization': Bearer ${token} }, body: JSON.stringify(data) });.
The response includes Retry-After, but the SDK doesn’t seem to respect it automatically. Is there a recommended pattern for batching or rate-limiting within the JavaScript SDK? Or should we just parse the header and sleep manually?