hashicorp / go-retryablehttp

Retryable HTTP client in Go
Mozilla Public License 2.0
1.99k stars 251 forks source link

Misalignment of ErrorPropagatedRetryPolicy and DefaultRetryPolicy #117

Closed maximerety closed 4 years ago

maximerety commented 4 years ago

Quoting the documentation of ErrorPropagatedRetryPolicy:

ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it propagates errors back instead of returning nil.

But there is a difference since the merge of PR https://github.com/hashicorp/go-retryablehttp/pull/100, which added retries on 429 Too Many Requests errors in DefaultRetryPolicy... but not in ErrorPropagatedRetryPolicy.

Fix proposal in https://github.com/hashicorp/go-retryablehttp/pull/116 to realign both policies.