Expand OkHttp retry exception predicate#7047
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7047 +/- ##
============================================
- Coverage 89.96% 89.95% -0.01%
+ Complexity 6663 6661 -2
============================================
Files 748 748
Lines 20085 20086 +1
Branches 1970 1970
============================================
- Hits 18069 18068 -1
- Misses 1423 1425 +2
Partials 593 593 ☔ View full report in Codecov by Sentry. |
|
Nice PR 👍 I just want to add that UnknownHostException is not always transient. e.g if the hostname/DNS does not exist at all, there is no need for retry as it will not help So could you tell the arguments why adding it to defaults is reasonable ? |
|
Yes you're right - the ability for a retry to succeed when encountering a DNS hostname error is situational. Reasons for retrying by default:
|
Reflects discussion here.
This brings OkHttp more in line with JdkHttpSender, which retries on any IOException except SSLException.