Skip to content

Commit

Permalink
client-go: chain the error returned by rate limiter
Browse files Browse the repository at this point in the history
Kubernetes-commit: 6acbe7e6452a44057768c61909da2d5b7c878159
  • Loading branch information
tkashem authored and k8s-publishing-bot committed Feb 24, 2022
1 parent a1a133b commit 147848c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rest/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,9 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err
now := time.Now()

err := r.rateLimiter.Wait(ctx)

if err != nil {
err = fmt.Errorf("client rate limiter Wait returned an error: %w", err)
}
latency := time.Since(now)

var message string
Expand Down

0 comments on commit 147848c

Please sign in to comment.