code: private int handleIOException(IOException ex) throws IOException {
  		if (AUTH_ERROR.equals(ex.getMessage()) || AUTH_ERROR_JELLY_BEAN.equals(ex.getMessage())) {
  			return HttpStatus.UNAUTHORIZED.value();
  		} else if (PROXY_AUTH_ERROR.equals(ex.getMessage())) {
  			return HttpStatus.PROXY_AUTHENTICATION_REQUIRED.value();
  		} else {
  			throw ex;
  		}
  	}
docs: If credentials are incorrect or not provided for Basic Auth, then Android
  may throw this exception when an HTTP 401 is received. A separate exception
  is thrown for proxy authentication errors. Checking for this response and
  returning the proper status.
  @param ex the exception raised from Android
  @return HTTP Status Code