Skip to content

Commit d7012b1

Browse files
dfirovagcf-owl-bot[bot]
authored andcommitted
chore (samples) Refactored error handling check for import product from GCS. (#505)
* Refactored error handling check. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * PR fix: refactoring. Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7ae3911 commit d7012b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

retail/interactive-tutorials/src/main/java/product/ImportProductsGcs.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public static void main(String[] args) throws IOException, InterruptedException
4646
"projects/%s/locations/global/catalogs/default_catalog/branches/0", projectId);
4747
String gcsBucket = String.format("gs://%s", System.getenv("BUCKET_NAME"));
4848
String gcsErrorBucket = String.format("%s/errors", gcsBucket);
49-
String gscProductsObject = "products.json";
50-
// TO CHECK ERROR HANDLING USE THE JSON WITH INVALID PRODUCT
51-
// GCS_PRODUCTS_OBJECT = "products_some_invalid.json"
49+
String gcsProductsObject = "products.json";
50+
// To check error handling, use an invalid product JSON.
51+
// gcsProductsObject = "products_some_invalid.json";
5252

5353
ImportProductsRequest importGcsRequest =
54-
getImportProductsGcsRequest(gscProductsObject, gcsBucket, gcsErrorBucket, branchName);
54+
getImportProductsGcsRequest(gcsProductsObject, gcsBucket, gcsErrorBucket, branchName);
5555
waitForOperationCompletion(importGcsRequest);
5656
}
5757

0 commit comments

Comments
 (0)