|
63 | 63 | import java.io.InputStream; |
64 | 64 | import java.lang.reflect.InvocationTargetException; |
65 | 65 | import java.lang.reflect.Method; |
| 66 | +import java.net.ConnectException; |
66 | 67 | import java.net.URL; |
67 | 68 | import java.nio.charset.StandardCharsets; |
68 | 69 | import java.time.Duration; |
@@ -1408,7 +1409,7 @@ public CompletableFuture<InsertResponse> insert(String tableName, List<?> data, |
1408 | 1409 | metrics.operationComplete(); |
1409 | 1410 | metrics.setQueryId(queryId); |
1410 | 1411 | return new InsertResponse(metrics); |
1411 | | - } catch ( NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException e) { |
| 1412 | + } catch (NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException | ConnectException e) { |
1412 | 1413 | lastException = httpClientHelper.wrapException("Insert request initiation failed", e); |
1413 | 1414 | if (httpClientHelper.shouldRetry(e, finalSettings.getAllSettings())) { |
1414 | 1415 | LOG.warn("Retrying", e); |
@@ -1536,7 +1537,7 @@ public CompletableFuture<InsertResponse> insert(String tableName, |
1536 | 1537 | metrics.operationComplete(); |
1537 | 1538 | metrics.setQueryId(queryId); |
1538 | 1539 | return new InsertResponse(metrics); |
1539 | | - } catch ( NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException e) { |
| 1540 | + } catch (NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException | ConnectException e) { |
1540 | 1541 | lastException = httpClientHelper.wrapException("Insert request initiation failed", e); |
1541 | 1542 | if (httpClientHelper.shouldRetry(e, finalSettings.getAllSettings())) { |
1542 | 1543 | LOG.warn("Retrying", e); |
@@ -1702,7 +1703,7 @@ public CompletableFuture<QueryResponse> query(String sqlQuery, Map<String, Objec |
1702 | 1703 |
|
1703 | 1704 | return new QueryResponse(httpResponse, finalSettings.getFormat(), finalSettings, metrics); |
1704 | 1705 |
|
1705 | | - } catch ( NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException e) { |
| 1706 | + } catch (NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException | ConnectException e) { |
1706 | 1707 | lastException = httpClientHelper.wrapException("Query request initiation failed", e); |
1707 | 1708 | if (httpClientHelper.shouldRetry(e, finalSettings.getAllSettings())) { |
1708 | 1709 | LOG.warn("Retrying.", e); |
|
0 commit comments