File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
bolt/src/main/java/com/slack/api/bolt/service/builtin Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,14 @@ public Initializer initializer() {
4646 log .debug ("AWS credentials loaded (access key id: {})" , credentials .accessKeyId ());
4747 }
4848 boolean bucketExists = false ;
49- Exception error = null ;
49+ Exception ex = null ;
5050 try (S3Client s3 = createS3Client ()) {
5151 bucketExists = s3 .headBucket (HeadBucketRequest .builder ().bucket (bucketName ).build ()) != null ;
5252 } catch (Exception e ) { // NoSuchBucketException etc.
53- error = e ;
53+ ex = e ;
5454 }
5555 if (!bucketExists ) {
56+ String error = ex != null ? ex .getClass ().getName () + ":" + ex .getMessage () : "-" ;
5657 String message = "Failed to access the Amazon S3 bucket (name: " + bucketName + ", error: " + error + ")" ;
5758 throw new IllegalStateException (message );
5859 }
Original file line number Diff line number Diff line change @@ -42,13 +42,14 @@ public Initializer initializer() {
4242 log .debug ("AWS credentials loaded (access key id: {})" , credentials .accessKeyId ());
4343 }
4444 boolean bucketExists = false ;
45- Exception error = null ;
45+ Exception ex = null ;
4646 try (S3Client s3 = createS3Client ()) {
4747 bucketExists = s3 .headBucket (HeadBucketRequest .builder ().bucket (bucketName ).build ()) != null ;
4848 } catch (Exception e ) { // NoSuchBucketException etc.
49- error = e ;
49+ ex = e ;
5050 }
5151 if (!bucketExists ) {
52+ String error = ex != null ? ex .getClass ().getName () + ":" + ex .getMessage () : "-" ;
5253 String message = "Failed to access the Amazon S3 bucket (name: " + bucketName + ", error: " + error + ")" ;
5354 throw new IllegalStateException (message );
5455 }
You can’t perform that action at this time.
0 commit comments