diff --git a/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java b/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java index 57c731906..bca7612c3 100644 --- a/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java +++ b/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java @@ -223,7 +223,7 @@ private void pairTraverse(GCSPath sourcePath, GCSPath destPath, boolean recursiv sourceBucket = storage.get(sourcePath.getBucket()); } catch (Exception e) { // Add more descriptive error message - String errorReason = String.format("Unable to access GCS bucket '%s'", destPath.getBucket()); + String errorReason = String.format("Unable to access GCS bucket '%s'", sourcePath.getBucket()); throw GCPErrorDetailsProviderUtil.getHttpResponseExceptionDetailsFromChain(e, errorReason, ErrorType.UNKNOWN, true, GCPUtils.GCS_SUPPORTED_DOC_URL); }