code: private HttpResponse handleExecuteMediaException(
        IOException e, Get getObject, boolean retryWithLiveVersion) throws IOException {
      if (errorExtractor.itemNotFound(e)) {
        if (retryWithLiveVersion) {
          generation = null;
          footerContent = null;
          getObject.setGeneration(null);
          try {
            return getObject.executeMedia();
          } catch (IOException e1) {
            return handleExecuteMediaException(e1, getObject, /* retryWithLiveVersion= */ false);
          }
        }
        throw GoogleCloudStorageExceptions.getFileNotFoundException(bucketName, objectName);
      }
      String msg =
          String.format("Error reading '%s' at position %d", resourceIdString, currentPosition);
      if (errorExtractor.rangeNotSatisfiable(e)) {
        throw (EOFException) new EOFException(msg).initCause(e);
      }
      throw new IOException(msg, e);
    }
docs: When an IOException is thrown, depending on if the exception is caused by non-existent object
  generation, and depending on the generation read consistency setting, either retry the read (of
  the latest generation), or handle the exception directly.
  
  @param e IOException thrown while reading from GCS.
  @param getObject the Get request to GCS.
  @param retryWithLiveVersion flag indicating whether we should strip the generation (thus read
  from the latest generation) and retry.
  @return the HttpResponse of reading from GCS from possible retry.
  @throws IOException either error on retry, or thrown because the original read encounters
  error.