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
public class AwsServiceException extends SdkServiceException
Extension ofSdkServiceException
that 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 interface
AwsServiceException.Builder
protected static class
AwsServiceException.BuilderImpl
-
Constructor Summary
Constructors Modifier Constructor Description protected
AwsServiceException(AwsServiceException.Builder b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsErrorDetails
awsErrorDetails()
Additional details pertaining to an exception thrown by an AWS service.static AwsServiceException.Builder
builder()
String
getMessage()
boolean
isClockSkewException()
boolean
isThrottlingException()
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.Builder
toBuilder()
Create aAwsServiceException.Builder
initialized 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:
getMessage
in classThrowable
-
isClockSkewException
public boolean isClockSkewException()
- Overrides:
isClockSkewException
in classSdkServiceException
-
isThrottlingException
public boolean isThrottlingException()
Checks if the exception is caused by throttling, considering both generic SDK and AWS-specific error code details.- Overrides:
isThrottlingException
in 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.Builder
instance to construct a newAwsServiceException
.
-
toBuilder
public AwsServiceException.Builder toBuilder()
Create aAwsServiceException.Builder
initialized with the properties of thisAwsServiceException
.- Overrides:
toBuilder
in classSdkServiceException
- Returns:
- A new builder initialized with this config's properties.
-
serializableBuilderClass
public static Class<? extends AwsServiceException.Builder> serializableBuilderClass()
-
-