Skip to content

Commit bf858c4

Browse files
committed
Revert changes for mapMetaDataForAllBlobs
1 parent 2497bc3 commit bf858c4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,7 @@ public void mapMetaDataForAllBlobs(String path, Consumer<Map<String, String>> fu
119119
return;
120120
}
121121
GCSPath gcsPath = GCSPath.from(path);
122-
Page<Blob> blobPage;
123-
try {
124-
blobPage = storage.list(gcsPath.getBucket(), Storage.BlobListOption.prefix(gcsPath.getName()));
125-
} catch (Exception e) {
126-
String errorReason = String.format("Unable to list objects in bucket %s.", gcsPath.getBucket());
127-
throw GCPErrorDetailsProviderUtil.getHttpResponseExceptionDetailsFromChain(e, errorReason, ErrorType.UNKNOWN,
128-
true, GCPUtils.GCS_SUPPORTED_DOC_URL);
129-
}
122+
Page<Blob> blobPage = storage.list(gcsPath.getBucket(), Storage.BlobListOption.prefix(gcsPath.getName()));
130123
Iterator<Blob> blobIterator = blobPage.iterateAll().iterator();
131124
while (blobIterator.hasNext()) {
132125
Blob blob = blobIterator.next();

0 commit comments

Comments
 (0)