Source:
<code>protected ActionResult processException(Exception e, String scope) { ActionResult result = new ActionResult(); Log.w(TAG, String.format("%s %s", scope, e.getClass().getName()), e); if(e instanceof UnsuccessfulResponseException) { UnsuccessfulResponseException ure = (UnsuccessfulResponseException)e; if(ure instanceof AuthorizationException) { result.setErrorType(ActionResult.ErrorType.INCORRECT_CREDENTIALS); result.setMessage(ure.getResponseBody()); } else { result.setErrorType(ure.getResponseCode() == 500 ? ActionResult.ErrorType.SERVER_ERROR : ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } } else if(e instanceof IncorrectConfigurationException) { result.setErrorType(ActionResult.ErrorType.INCORRECT_CONFIGURATION); result.setMessage(e.getMessage()); } else if(e instanceof IOException) { boolean handled = false; if(getSettings().isConfigurationOk()) { if(e instanceof java.net.UnknownHostException || e instanceof java.net.ConnectException || e instanceof java.net.SocketTimeoutException) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } else if(e instanceof javax.net.ssl.SSLException && e.getMessage() != null && e.getMessage().contains("Connection timed out")) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } else if(e instanceof java.net.SocketException && e.getMessage() != null && e.getMessage().contains("Software caused connection abort")) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } } if(!handled) { result.setErrorType(ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } <START> } else if(e instanceof IllegalArgumentException) { <END> result.setErrorType(!getSettings().isConfigurationOk() ? ActionResult.ErrorType.INCORRECT_CONFIGURATION : ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } else { result.setErrorType(ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } return result; }</code><technical_language>IllegalArgumentException is broad - settings check is necessary. I endorse suggested change</technical_language>

Target:
protected ActionResult processException(Exception e, String scope) { ActionResult result = new ActionResult(); Log.w(TAG, String.format("%s %s", scope, e.getClass().getName()), e); if(e instanceof UnsuccessfulResponseException) { UnsuccessfulResponseException ure = (UnsuccessfulResponseException)e; if(ure instanceof AuthorizationException) { result.setErrorType(ActionResult.ErrorType.INCORRECT_CREDENTIALS); result.setMessage(ure.getResponseBody()); } else { result.setErrorType(ure.getResponseCode() == 500 ? ActionResult.ErrorType.SERVER_ERROR : ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } } else if(e instanceof IncorrectConfigurationException) { result.setErrorType(ActionResult.ErrorType.INCORRECT_CONFIGURATION); result.setMessage(e.getMessage()); } else if(e instanceof IOException) { boolean handled = false; if(getSettings().isConfigurationOk()) { if(e instanceof java.net.UnknownHostException || e instanceof java.net.ConnectException || e instanceof java.net.SocketTimeoutException) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } else if(e instanceof javax.net.ssl.SSLException && e.getMessage() != null && e.getMessage().contains("Connection timed out")) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } else if(e instanceof java.net.SocketException && e.getMessage() != null && e.getMessage().contains("Software caused connection abort")) { result.setErrorType(ActionResult.ErrorType.TEMPORARY); handled = true; } } if(!handled) { result.setErrorType(ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } } else if(e instanceof IllegalArgumentException && !getSettings().isConfigurationOk()) { result.setErrorType(ActionResult.ErrorType.INCORRECT_CONFIGURATION); result.setMessage(e.toString()); } else { result.setErrorType(ActionResult.ErrorType.UNKNOWN); result.setMessage(e.toString()); } return result; }