Skip to content

Commit cd728cf

Browse files
committed
preserve detailed logs
1 parent c0c2248 commit cd728cf

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/main/java/com/uid2/shared/vertx/CloudSyncVerticle.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,13 @@ private void cloudDownloadBlocking(String s3Path) throws Exception {
400400

401401
downloadFailureTimer.record(java.time.Duration.ofMillis(cloudDownloadTimeMs));
402402
// Be careful as the s3Path may contain the pre-signed S3 token, so do not log the whole path
403-
LOGGER.error("download error: " + ex.getClass().getSimpleName());
404-
throw new CloudStorageException("Download failed");
403+
LOGGER.error("Cloud storage download error, exception type: " + ex.getClass().getSimpleName());
404+
405+
if (ex instanceof CloudStorageException) {
406+
throw (CloudStorageException) ex;
407+
}
408+
throw new CloudStorageException("Failed to download file from cloud storage, exception: "
409+
+ ex.getClass().getSimpleName() + ", please check network connectivity and service availability");
405410
}
406411
}
407412

0 commit comments

Comments
 (0)