Describe the Question
The http Client custom retry function will have an exception when canIdempotentRetry is false?
Reproducible Code

Expected behavior
if canIdempotentRetry && client.DefaultRetryIf(req, resp, err) && errors.Is(err, errs.ErrBadPoolConn) {
connAttempts++
continue
}
if isDefaultRetryFunc {
break
}
attempts++
if attempts >= maxAttempts {
break
}
// Check whether this request should be retried
if canIdempotentRetry && !isRequestRetryable(req, resp, err) {
break
}
Would it be better to write like this?
Describe the Question
The http Client custom retry function will have an exception when canIdempotentRetry is false?
Reproducible Code
Expected behavior
Would it be better to write like this?