hashicorp / go-retryablehttp

Retryable HTTP client in Go
Mozilla Public License 2.0
1.96k stars 247 forks source link

Better comments for `err == nil` scenario #149

Closed devosnw closed 2 years ago

devosnw commented 2 years ago

Lemme know if this make more sense. I don't think this comment was entirely accurate.

I think we can only get to this block if we've had no errors (from Do and CheckRetry) but somehow we still wanted to retry.

hashicorp-cla commented 2 years ago

CLA assistant check
All committers have signed the CLA.

devosnw commented 2 years ago

Gonna close this actually. I understand better what's going on here. I still don't love the original comments but mine aren't good either. err == nil is what will generally happen when using DefaultRetryPolicy and the below case is what will happen when using ErrorPropagatedRetryPolicy