Class AwsServiceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- software.amazon.awssdk.core.exception.SdkException
-
- software.amazon.awssdk.core.exception.SdkServiceException
-
- software.amazon.awssdk.awscore.exception.AwsServiceException
-
- All Implemented Interfaces:
Serializable,SdkPojo
@SdkPublicApi public class AwsServiceException extends SdkServiceException
Extension ofSdkServiceExceptionthat represents an error response returned by an Amazon web service.AwsServiceException provides callers several pieces of information that can be used to obtain more information about the error and why it occurred.
- See Also:
SdkServiceException, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAwsServiceException.Builderprotected static classAwsServiceException.BuilderImpl
-
Constructor Summary
Constructors Modifier Constructor Description protectedAwsServiceException(AwsServiceException.Builder b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsErrorDetailsawsErrorDetails()Additional details pertaining to an exception thrown by an AWS service.static AwsServiceException.Builderbuilder()StringgetMessage()booleanisClockSkewException()booleanisThrottlingException()Checks if the exception is caused by throttling, considering both generic SDK and AWS-specific error code details.static Class<? extends AwsServiceException.Builder>serializableBuilderClass()AwsServiceException.BuildertoBuilder()Create aAwsServiceException.Builderinitialized with the properties of thisAwsServiceException.-
Methods inherited from class software.amazon.awssdk.core.exception.SdkServiceException
extendedRequestId, isRetryableException, requestId, sdkFields, statusCode
-
Methods inherited from class software.amazon.awssdk.core.exception.SdkException
create, numAttempts, rawMessage, retryable
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField
-
-
-
-
Constructor Detail
-
AwsServiceException
protected AwsServiceException(AwsServiceException.Builder b)
-
-
Method Detail
-
awsErrorDetails
public AwsErrorDetails awsErrorDetails()
Additional details pertaining to an exception thrown by an AWS service.- Returns:
AwsErrorDetails.
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
isClockSkewException
public boolean isClockSkewException()
- Overrides:
isClockSkewExceptionin classSdkServiceException
-
isThrottlingException
public boolean isThrottlingException()
Checks if the exception is caused by throttling, considering both generic SDK and AWS-specific error code details.- Overrides:
isThrottlingExceptionin classSdkServiceException- Returns:
- true if the status code is 429 or if the AWS error code indicates throttling, otherwise false.
-
builder
public static AwsServiceException.Builder builder()
- Returns:
AwsServiceException.Builderinstance to construct a newAwsServiceException.
-
toBuilder
public AwsServiceException.Builder toBuilder()
Create aAwsServiceException.Builderinitialized with the properties of thisAwsServiceException.- Overrides:
toBuilderin classSdkServiceException- Returns:
- A new builder initialized with this config's properties.
-
serializableBuilderClass
public static Class<? extends AwsServiceException.Builder> serializableBuilderClass()
-
-