Source:
<code>private ResultAndError<PullTaskResult> getRequestResultOrRetry(AndroidTransactionParserFactory factory) { while (asyncRestoreHelper.retryWaitPeriodInProgress()) { try { Thread.sleep(500); } catch (InterruptedException e) { } if (isCancelled()) { return new ResultAndError<>(PullTaskResult.UNKNOWN_FAILURE); } } PullTaskResult responseError = PullTaskResult.UNKNOWN_FAILURE; asyncRestoreHelper.retryAtTime = -1; try { ResultAndError<PullTaskResult> result = makeRequestAndHandleResponse(factory); if (PullTaskResult.RETRY_NEEDED.equals(result.data)) { asyncRestoreHelper.startReportingServerProgress(); return getRequestResultOrRetry(factory); } else { return result; } } catch (SocketTimeoutException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Timed out listening to receive data during sync"); responseError = PullTaskResult.CONNECTION_TIMEOUT; } catch (UnknownHostException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to bad network"); <START> responseError = PullTaskResult.UNREACHABLE_HOST; <END> } catch (IOException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to IO Error|" + e.getMessage()); } catch (UnknownSyncError e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to Unknown Error|" + e.getMessage()); } wipeLoginIfItOccurred(); this.publishProgress(PROGRESS_DONE); return new ResultAndError<>(responseError); }</code><technical_language>Is this longer a valid exception for some reason? a difference SocketTimeouts Connection timeouts in retrofit, right? Do need add new exception type for retrofit's verison</technical_language>

Target:
private ResultAndError<PullTaskResult> getRequestResultOrRetry(AndroidTransactionParserFactory factory) { while (asyncRestoreHelper.retryWaitPeriodInProgress()) { try { Thread.sleep(500); } catch (InterruptedException e) { } if (isCancelled()) { return new ResultAndError<>(PullTaskResult.UNKNOWN_FAILURE); } } PullTaskResult responseError = PullTaskResult.UNKNOWN_FAILURE; asyncRestoreHelper.retryAtTime = -1; try { ResultAndError<PullTaskResult> result = makeRequestAndHandleResponse(factory); if (PullTaskResult.RETRY_NEEDED.equals(result.data)) { asyncRestoreHelper.startReportingServerProgress(); return getRequestResultOrRetry(factory); } else { return result; } } catch (SocketTimeoutException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Timed out listening to receive data during sync"); responseError = PullTaskResult.CONNECTION_TIMEOUT; } catch (UnknownHostException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to bad network"); responseError = PullTaskResult.UNREACHABLE_HOST; } catch (AuthenticationInterceptor.PlainTextPasswordException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_ERROR_CONFIG_STRUCTURE, "Encountered PlainTextPasswordException during sync: Sending password over HTTP"); responseError = PullTaskResult.AUTH_OVER_HTTP; } catch (IOException e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to IO Error|" + e.getMessage()); } catch (UnknownSyncError e) { e.printStackTrace(); Logger.log(LogTypes.TYPE_WARNING_NETWORK, "Couldn't sync due to Unknown Error|" + e.getMessage()); } wipeLoginIfItOccurred(); this.publishProgress(PROGRESS_DONE); return new ResultAndError<>(responseError); }