From 3cd97cc3d57c1b553a6d4e2f63cdf657ca94edbe Mon Sep 17 00:00:00 2001 From: Vishal Egbert Date: Mon, 3 Feb 2025 21:21:19 +1100 Subject: [PATCH 1/3] Add extra S3 logging --- src/main/java/com/uid2/shared/cloud/CloudStorageS3.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java b/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java index 21a82c62..0adaa422 100644 --- a/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java +++ b/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java @@ -131,11 +131,16 @@ public InputStream download(String cloudPath) throws CloudStorageException { S3Object obj = this.s3.getObject(bucket, cloudPath); return obj.getObjectContent(); } catch (AmazonS3Exception e) { +<<<<<<< Updated upstream if (e.getErrorCode().equals("NoSuchKey")) { throw new CloudStorageException("The specified key does not exist: " + e.getClass().getSimpleName() + ": " + bucket); } else { throw new CloudStorageException("s3 get error: " + e.getClass().getSimpleName() + ": " + bucket); } +======= + LOGGER.error("AWS S3 error: " + e.getMessage() + " for path: " + cloudPath + " in bucket: " + bucket + " with status code: " + e.getStatusCode() + " and error code: " + e.getErrorCode()); + throw new CloudStorageException("s3 get error: " + e.getMessage(), e); +>>>>>>> Stashed changes } catch (Throwable t) { // Do not log the message or the original exception as that may contain the pre-signed url throw new CloudStorageException("s3 get error: " + t.getClass().getSimpleName() + ": " + bucket); From 1147f736e7fc1a6dd3a7d0bea8793b74cae15f8e Mon Sep 17 00:00:00 2001 From: Vishal Egbert Date: Mon, 3 Feb 2025 21:24:33 +1100 Subject: [PATCH 2/3] Add extra S3 logging --- src/main/java/com/uid2/shared/cloud/CloudStorageS3.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java b/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java index 0adaa422..4857c6f4 100644 --- a/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java +++ b/src/main/java/com/uid2/shared/cloud/CloudStorageS3.java @@ -131,16 +131,12 @@ public InputStream download(String cloudPath) throws CloudStorageException { S3Object obj = this.s3.getObject(bucket, cloudPath); return obj.getObjectContent(); } catch (AmazonS3Exception e) { -<<<<<<< Updated upstream + LOGGER.error("AWS S3 error: " + e.getMessage() + " for path: " + cloudPath + " in bucket: " + bucket); if (e.getErrorCode().equals("NoSuchKey")) { throw new CloudStorageException("The specified key does not exist: " + e.getClass().getSimpleName() + ": " + bucket); } else { throw new CloudStorageException("s3 get error: " + e.getClass().getSimpleName() + ": " + bucket); } -======= - LOGGER.error("AWS S3 error: " + e.getMessage() + " for path: " + cloudPath + " in bucket: " + bucket + " with status code: " + e.getStatusCode() + " and error code: " + e.getErrorCode()); - throw new CloudStorageException("s3 get error: " + e.getMessage(), e); ->>>>>>> Stashed changes } catch (Throwable t) { // Do not log the message or the original exception as that may contain the pre-signed url throw new CloudStorageException("s3 get error: " + t.getClass().getSimpleName() + ": " + bucket); From be77da8f6c8a9ccd27232c76a09e9f6a693ff982 Mon Sep 17 00:00:00 2001 From: Release Workflow Date: Mon, 3 Feb 2025 10:28:28 +0000 Subject: [PATCH 3/3] [CI Pipeline] Released Snapshot version: 8.0.33-alpha-189-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eeb5e064..d945526a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.uid2 uid2-shared - 8.0.32 + 8.0.33-alpha-189-SNAPSHOT ${project.groupId}:${project.artifactId} Library for all the shared uid2 operations https://github.com/IABTechLab/uid2docs