Minor improvements in S3 error handling
This commit is contained in:
parent
ed3401836e
commit
98d22547b1
@ -108,7 +108,7 @@ class S3Impl {
|
|||||||
try {
|
try {
|
||||||
client().statObject(StatObjectArgs.builder().bucket(cloud.s3Bucket()).object(key).build());
|
client().statObject(StatObjectArgs.builder().bucket(cloud.s3Bucket()).object(key).build());
|
||||||
} catch (ErrorResponseException e) {
|
} catch (ErrorResponseException e) {
|
||||||
if (e.errorResponse().code().equals("NoSuchKey")) {
|
if (S3CloudApiErrorCodes.NO_SUCH_KEY.getValue().equals(e.errorResponse().code())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
throw new FatalBackendException(e);
|
throw new FatalBackendException(e);
|
||||||
@ -304,6 +304,7 @@ class S3Impl {
|
|||||||
for (Result<DeleteError> result : results) {
|
for (Result<DeleteError> result : results) {
|
||||||
try {
|
try {
|
||||||
DeleteError error = result.get();
|
DeleteError error = result.get();
|
||||||
|
// FIXME
|
||||||
System.out.println("Error in deleting object " + error.objectName() + "; " + error.message());
|
System.out.println("Error in deleting object " + error.objectName() + "; " + error.message());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
handleApiError(e, node.getPath());
|
handleApiError(e, node.getPath());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user