Skip to content

Commit ef8f25d

Browse files
Add several iOS network errors to retry list (#1544)
- NSURLErrorSecureConnectionFailed - NSURLErrorCannotFindHost - NSURLErrorDNSLookupFailed - NSURLErrorResourceUnavailable NSURLErrorSecureConnectionFailed is visible as SSL handshake timeout on slow network with high delays. The rest are more to be on a safe side as their descriptions are not stating are further tries useless. Relates-To: DATASDK-40 Signed-off-by: Rustam Gamidov <ext-rustam.gamidov@here.com>
1 parent 5347c79 commit ef8f25d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

olp-cpp-sdk-core/src/http/ios/OLPNetworkIOS.mm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
olp::http::ErrorCode ConvertNSURLErrorToNetworkErrorCode(NSInteger error_code) {
9393
switch (error_code) {
9494
case NSURLErrorUnsupportedURL:
95-
case NSURLErrorCannotFindHost:
9695
return ErrorCode::INVALID_URL_ERROR;
9796
case NSURLErrorNotConnectedToInternet:
9897
case NSURLErrorDataNotAllowed:
@@ -101,10 +100,14 @@
101100
return ErrorCode::TIMEOUT_ERROR;
102101
case NSURLErrorNetworkConnectionLost:
103102
case NSURLErrorCannotConnectToHost:
103+
case NSURLErrorSecureConnectionFailed:
104+
case NSURLErrorCannotFindHost:
105+
case NSURLErrorDNSLookupFailed:
106+
case NSURLErrorResourceUnavailable:
104107
return ErrorCode::IO_ERROR;
105108
default:
106109
if (error_code >= NSURLErrorClientCertificateRequired &&
107-
error_code <= NSURLErrorSecureConnectionFailed) {
110+
error_code <= NSURLErrorServerCertificateHasBadDate) {
108111
return ErrorCode::AUTHORIZATION_ERROR;
109112
} else {
110113
return ErrorCode::UNKNOWN_ERROR;

0 commit comments

Comments
 (0)