File tree 1 file changed +4
-2
lines changed
s3buildcache/src/main/kotlin/androidx/build/gradle/s3buildcache
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ import androidx.build.gradle.core.FileHandleInputStream
21
21
import androidx.build.gradle.core.FileHandleInputStream.Companion.handleInputStream
22
22
import androidx.build.gradle.core.StorageService
23
23
import org.gradle.api.logging.Logging
24
+ import software.amazon.awssdk.core.exception.SdkClientException
24
25
import software.amazon.awssdk.core.exception.SdkException
26
+ import software.amazon.awssdk.core.exception.SdkServiceException
25
27
import software.amazon.awssdk.core.sync.RequestBody
26
28
import software.amazon.awssdk.services.s3.S3Client
27
29
import software.amazon.awssdk.services.s3.model.DeleteObjectRequest
@@ -110,8 +112,8 @@ class S3StorageService(
110
112
client.headBucket(HeadBucketRequest .builder().bucket(bucketName).build())
111
113
} catch (e: NoSuchBucketException ) {
112
114
throw Exception (" Bucket $bucketName in $region cannot be found: ${e.message} " )
113
- } catch (e: SdkException ) {
114
- throw Exception (" AWS SDK exception on validating access to $bucketName in $region : ${e.message} " )
115
+ } catch (e: SdkServiceException ) {
116
+ throw Exception (" AWS SDK exception on validating access to $bucketName in $region : ${e:: class .simpleName} - ${e .message}" )
115
117
}
116
118
catch (e: Exception ) {
117
119
logger.warn(" Couldn't validate S3 client config: ${e.message} " )
You can’t perform that action at this time.
0 commit comments