launchdarkly / ld-find-code-refs

Build tool for automatically sending feature flag code references to LaunchDarkly
https://launchdarkly.com
Other
45 stars 34 forks source link

Handle API Rate Limit on call to `GetFlagKeyList` #433

Closed jonathan-ostrander closed 4 months ago

jonathan-ostrander commented 4 months ago

Current behavior

A call to GetFlagKeyList returns a 429 Too Many Requests causes ld-find-code-refs to either exits with exit code 0 if ignoreServiceErrors is set to true or throws a fatal error.

Expected behavior

A call to GetFlagKeyList returns a 429 Too Many Requests is handled by retrying the request after the X-Ratelimit-Reset time has passed. A maximum number of retries is configured through a new argument. If the maximum number of retries is hit then an error is thrown.

I plan on working on this change since it's currently affecting about 10% of our CI runs.

jazanne commented 4 months ago

Available in v2.11.9