AST-00000 Implement custom retry policy and backoff for HTTP requests…#146
Merged
cx-joaor-alves merged 5 commits intomasterfrom Feb 19, 2026
Merged
AST-00000 Implement custom retry policy and backoff for HTTP requests…#146cx-joaor-alves merged 5 commits intomasterfrom
cx-joaor-alves merged 5 commits intomasterfrom
Conversation
…, enhancing rate limit handling. Update error logging in project exclude settings retrieval.
…or clarity, and enhance error handling in permissions and CSV generation. Switch to switch-case statements for improved readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix API Rate Limiting and Improve Export Robustness
Summary
Improves export reliability by properly handling API rate limiting (429) and making exclude-settings fetching resilient to per-project failures (e.g., 501). Exports no longer abort when a single project has issues.
1. Smart Retry for 429 Too Many Requests
Problem:
scanSettings(and other endpoints) hit rate limits, causing failed and skipped projectsSolution:
Reactive-only retry logic (no proactive delays):
Retry-Afterwhen present, otherwise exponential backoff (200ms, 400ms, 800ms, …)Files changed:
internal/process.go–customRetryPolicy(),customBackoff(),getRetryHTTPClient()configuration2. Resilient Handling of 501 for Exclude Settings
Problem:
/projects/{id}/sourceCode/excludeSettingscaused the whole export to failSolution:
Files changed:
internal/process.go–fetchProjectExcludeSettings()usescontinuewith logging instead of returning an errorConfiguration Changes
httpRetryMaxhttpRateLimitRetryDelayTesting
Breaking Changes
None. Changes are backward compatible.