From e4fbc1e55fa58b73bcba7e8ba43f6c8adeb720df Mon Sep 17 00:00:00 2001 From: psainics Date: Wed, 11 Feb 2026 11:51:47 +0530 Subject: [PATCH] Add warning for 403 Forbidden error when accessing bucket --- src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java | 3 +++ 1 file changed, 3 insertions(+) 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 5cb2c9e8a..89797c036 100644 --- a/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java +++ b/src/main/java/io/cdap/plugin/gcp/gcs/StorageClient.java @@ -155,6 +155,9 @@ public void createBucketIfNotExists(GCSPath path, @Nullable String location, @Nu if (e.getCode() == 409) { LOG.warn("Getting 409 Conflict: {} Bucket at destination path {} may already exist.", e.getMessage(), path.getUri()); + } else if (e.getCode() == 403) { + LOG.warn("Getting 403 Forbidden: {} You may not have permissions to access the bucket at destination path {}.", + e.getMessage(), path.getUri()); } else { String errorReason = String.format("Unable to create bucket %s. Ensure you entered the correct bucket path and " +