Source:
<code>public static TDClientException defaultExceptionResolver(Exception e) throws TDClientException { if (TDClientException.class.isAssignableFrom(e.getClass())) { throw (TDClientException) e; } else if (e instanceof ProtocolException || e instanceof ConnectException || e instanceof EOFException) { return new TDClientInterruptedException("connection failure", e); } else if (e instanceof TimeoutException || e instanceof SocketTimeoutException) { return new TDClientTimeoutException(e); } else if (e instanceof SocketException) { final SocketException socketException = (SocketException) e; if (socketException instanceof BindException || socketException instanceof ConnectException || socketException instanceof NoRouteToHostException || socketException instanceof PortUnreachableException) { return new TDClientSocketException(socketException); } else { throw new TDClientSocketException(socketException); } } else if (e instanceof SSLException) { SSLException sslException = (SSLException) e; if (sslException instanceof SSLHandshakeException || sslException instanceof SSLKeyException || sslException instanceof SSLPeerUnverifiedException) { throw new TDClientSSLException(sslException); } else { return new TDClientSSLException(sslException); } } else if (e instanceof StreamResetException) { Date retryAfter = new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(1)); <START> return clientError(new TDClientHttpTooManyRequestsException(e.getMessage(), retryAfter)); <END> } else if (e.getCause() != null && Exception.class.isAssignableFrom(e.getCause().getClass())) { return defaultExceptionResolver((Exception) e.getCause()); } else { logger.warn("unknown type exception: " + e.getClass(), e); throw new TDClientProcessingException(e); } }</code><technical_language>throw TDClientHttpTooManyRequestsException wrapping clientError. clientError is for suppressing warning messages (e.g, 409 conflict creating tables). In this case, default retry backoff retryAfter parameter</technical_language>

Target:
public static TDClientException defaultExceptionResolver(Exception e) throws TDClientException { if (TDClientException.class.isAssignableFrom(e.getClass())) { throw (TDClientException) e; } else if (e instanceof ProtocolException || e instanceof ConnectException || e instanceof EOFException) { return new TDClientInterruptedException("connection failure", e); } else if (e instanceof TimeoutException || e instanceof SocketTimeoutException) { return new TDClientTimeoutException(e); } else if (e instanceof SocketException) { final SocketException socketException = (SocketException) e; if (socketException instanceof BindException || socketException instanceof ConnectException || socketException instanceof NoRouteToHostException || socketException instanceof PortUnreachableException) { return new TDClientSocketException(socketException); } else { throw new TDClientSocketException(socketException); } } else if (e instanceof SSLException) { SSLException sslException = (SSLException) e; if (sslException instanceof SSLHandshakeException || sslException instanceof SSLKeyException || sslException instanceof SSLPeerUnverifiedException) { throw new TDClientSSLException(sslException); } else { return new TDClientSSLException(sslException); } } else if (e instanceof StreamResetException) { Date retryAfter = new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(1)); return new TDClientHttpTooManyRequestsException(e.getMessage(), retryAfter); } else if (e.getCause() != null && Exception.class.isAssignableFrom(e.getCause().getClass())) { return defaultExceptionResolver((Exception) e.getCause()); } else { logger.warn("unknown type exception: " + e.getClass(), e); throw new TDClientProcessingException(e); } }