Skip to content

Commit

Permalink
fix: increase number of retries during Snyk enrichment (#110)
Browse files Browse the repository at this point in the history
This should eliminate 429 errors
  • Loading branch information
JoeySnyk authored Feb 10, 2025
1 parent 9e99951 commit 07595e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/snyk/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func GetPackageVulnerabilities(cfg *Config, purl *packageurl.PackageURL, auth *s

func getRetryClient(logger *zerolog.Logger) *http.Client {
rc := retryablehttp.NewClient()
rc.RetryMax = 20
rc.Logger = nil
rc.ErrorHandler = retryablehttp.PassthroughErrorHandler
rc.ResponseLogHook = func(_ retryablehttp.Logger, r *http.Response) {
Expand Down

0 comments on commit 07595e5

Please sign in to comment.