FileCopyGetChunkResponse getFileCopyGetChunkResponse(String operationName, FileCopyInfo fileCopyInfo,
      FileChunkInfo fileChunkInfo, String snapshotId, boolean isChunked) {
    validateIfStoreFileCopyHandlerIsRunning();

    FileCopyGetChunkResponse chunkResponse = null;
    String errorSuffix = " while processing the " + (isChunked ? "chunk" : "file");
    try {
      chunkResponse = operationRetryHandler.executeWithRetry(
          () -> new GetChunkDataWorkflow(connectionPool, fileCopyInfo, fileChunkInfo, snapshotId, clusterMap, config)
              .execute(), operationName);
    } catch (IOException e) {
      logMessageAndThrow(operationName, "IO error" + errorSuffix, e,
          FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerWriteToDiskError);
    } catch (ConnectionPoolTimeoutException e) {
      logMessageAndThrow(operationName, "Connection pool timeout" + errorSuffix, e,
          FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerGetChunkDataApiError);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt(); // Preserve interrupt status

      logMessageAndThrow(operationName, "Thread interrupted" + errorSuffix, e,
          FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerGetChunkDataApiError);
    } catch (RuntimeException e) {
      logMessageAndThrow(operationName, "Unexpected runtime error" + errorSuffix, e,
          FileCopyHandlerException.FileCopyHandlerErrorCode.UnknownError);
    } catch (Exception e) {
      logMessageAndThrow(operationName, "Exception" + errorSuffix, e,
          FileCopyHandlerException.FileCopyHandlerErrorCode.UnknownError);
    }
    validateResponseOrThrow(chunkResponse, operationName);
    return chunkResponse;
  }
Get the chunk data for the file copy.
@param fileCopyInfo the file copy info of type {@link FileCopyInfo}
@param isChunked boolean to indicate if the file is chunked
@return the chunk response of type {@link FileCopyGetChunkResponse}
ambry-file-transfer/src/main/java/com/github/ambry/filetransfer/handler/StoreFileCopyHandler.java