Exception Class Name Changes - AWS SDK for Java
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

Exception Class Name Changes

This topic contains a mapping of exception class-related name changes between versions 1.11.x and 2.x.

This table maps the exception class name changes.

1.11.x 2.x

com.amazonaws.SdkBaseException

com.amazonaws.AmazonClientException

software.amazon.awssdk.core.exception.SdkException

com.amazonaws.SdkClientException

software.amazon.awssdk.core.exception.SdkClientException

com.amazonaws.AmazonServiceException

software.amazon.awssdk.awscore.exception.AwsServiceException

The following table maps the methods on exception classes between version 1.11.x and 2.x.

1.11.x 2.x

AmazonServiceException.getRequestId

SdkServiceException.requestId

AmazonServiceException.getServiceName

AwsServiceException.awsErrorDetails().serviceName

AmazonServiceException.getErrorCode

AwsServiceException.awsErrorDetails().errorCode

AmazonServiceException.getErrorMessage

AwsServiceException.awsErrorDetails().errorMessage

AmazonServiceException.getStatusCode

AwsServiceException.awsErrorDetails().sdkHttpResponse().statusCode

AmazonServiceException.getHttpHeaders

AwsServiceException.awsErrorDetails().sdkHttpResponse().headers

AmazonServiceException.rawResponse

AwsServiceException.awsErrorDetails().rawResponse