You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by ka...@apache.org on 2022/08/19 08:09:29 UTC

[james-project] branch master updated: JAMES-3806 S3BlobStoreDAO logs missing blob id if not found

This is an automated email from the ASF dual-hosted git repository.

kao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d707fc3c8 JAMES-3806 S3BlobStoreDAO logs missing blob id if not found
4d707fc3c8 is described below

commit 4d707fc3c88b1236632ad604992806f4dab3837f
Author: Karsten Otto <ka...@akquinet.de>
AuthorDate: Wed Aug 17 11:20:31 2022 +0200

    JAMES-3806 S3BlobStoreDAO logs missing blob id if not found
---
 .../org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
index 1f25af25bc..e420d10559 100644
--- a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
+++ b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
@@ -161,7 +161,7 @@ public class S3BlobStoreDAO implements BlobStoreDAO, Startable, Closeable {
 
         return ReactorUtils.toInputStream(getObject(resolvedBucketName, blobId)
             .onErrorMap(NoSuchBucketException.class, e -> new ObjectNotFoundException("Bucket not found " + resolvedBucketName.asString(), e))
-            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + resolvedBucketName.asString(), e))
+            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + blobId.asString() + " in bucket " + resolvedBucketName.asString(), e))
             .block()
             .flux);
     }
@@ -172,7 +172,7 @@ public class S3BlobStoreDAO implements BlobStoreDAO, Startable, Closeable {
 
         return getObject(resolvedBucketName, blobId)
             .onErrorMap(NoSuchBucketException.class, e -> new ObjectNotFoundException("Bucket not found " + resolvedBucketName.asString(), e))
-            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + resolvedBucketName.asString(), e))
+            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + blobId.asString() + " in bucket " + resolvedBucketName.asString(), e))
             .map(res -> ReactorUtils.toInputStream(res.flux));
     }
 
@@ -225,7 +225,7 @@ public class S3BlobStoreDAO implements BlobStoreDAO, Startable, Closeable {
                     builder -> builder.bucket(resolvedBucketName.asString()).key(blobId.asString()),
                     new MinimalCopyBytesResponseTransformer()))
             .onErrorMap(NoSuchBucketException.class, e -> new ObjectNotFoundException("Bucket not found " + resolvedBucketName.asString(), e))
-            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + resolvedBucketName.asString(), e))
+            .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + blobId.asString() + " in bucket " + resolvedBucketName.asString(), e))
             .publishOn(Schedulers.parallel())
             .map(BytesWrapper::asByteArray);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org