429 Too Many Requests on /api/v2/users bulk updates - retry logic failing

GET /api/v2/users returns 200 fine, but the subsequent PUT /api/v2/users/{id} loop for 500 users hits a wall immediately.

Docs state: “Rate limits are applied per application and per endpoint. A 429 status code indicates the limit has been reached.”

I’m using the Python SDK. The code looks standard:

for user in users_to_update:
 try:
 api_instance.update_user(user.id, update_body)
 except ApiClientException as e:
 if e.status == 429:
 time.sleep(2)
 api_instance.update_user(user.id, update_body)
 else:
 raise e

The retry fires once, hits another 429, and crashes. The Retry-After header is present in the response but the SDK client doesn’t seem to parse it automatically in this context. I’m getting 429: Too Many Requests errors flooding the logs.

Is the exponential backoff logic in the SDK broken for bulk operations, or am I missing a header check? The sleep interval feels arbitrary. I need to know how to properly extract the Retry-After value from the response headers to set the delay dynamically. The current static sleep isn’t cutting it for this volume.