Class AwsXmlErrorProtocolUnmarshaller
java.lang.Object
software.amazon.awssdk.protocols.query.unmarshall.AwsXmlErrorProtocolUnmarshaller
- All Implemented Interfaces:
HttpResponseHandler<AwsServiceException>
public final class AwsXmlErrorProtocolUnmarshaller
extends Object
implements HttpResponseHandler<AwsServiceException>
Error unmarshaller for Query/EC2/XML based protocols. Some examples of error responses from
the various protocols are below.
Legacy Query (SimpleDB/EC2)
<Response>
<Errors>
<Error>
<Code>MissingParameter</Code>
<Message>The request must contain the parameter DomainName</Message>
<BoxUsage>0.0055590278</BoxUsage>
</Error>
</Errors>
<RequestID>ad3280dd-5ac1-efd1-b9b0-a86969a9234d</RequestID>
</Response>
Traditional Query/Rest-XML (Cloudfront)
<ErrorResponse xmlns="http://cloudfront.amazonaws.com/doc/2017-10-30/">
<Error>
<Type>Sender</Type>
<Code>MalformedInput</Code>
<Message>Invalid XML document</Message>
</Error>
<RequestId>7c8da4af-de44-11e8-a60e-1b2014315455</RequestId>
</ErrorResponse>
Amazon S3
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>flajdfadjfladjf</BucketName>
<RequestId>D9DBB9F267849CA3</RequestId>
<HostId>fn8B1fUvWzg7I3CIeMT4UMqCZDF4+QO1JlbOJlQAVOosACZsLWv/K2dapVncz34a2mArhp11PjI=</HostId>
</Error>
-
Nested Class Summary
-
Field Summary
Fields inherited from interface software.amazon.awssdk.core.http.HttpResponseHandler
X_AMZ_ID_2_HEADER, X_AMZN_REQUEST_ID_HEADER, X_AMZN_REQUEST_ID_HEADER_ALTERNATE, X_AMZN_REQUEST_ID_HEADERS
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
handle
(SdkHttpFullResponse response, ExecutionAttributes executionAttributes) Accepts an HTTP response object, and returns an object of type T.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.core.http.HttpResponseHandler
needsConnectionLeftOpen
-
Method Details
-
handle
public AwsServiceException handle(SdkHttpFullResponse response, ExecutionAttributes executionAttributes) Description copied from interface:HttpResponseHandler
Accepts an HTTP response object, and returns an object of type T. Individual implementations may choose to handle the response however they need to, and return any type that they need to.- Specified by:
handle
in interfaceHttpResponseHandler<AwsServiceException>
- Parameters:
response
- The HTTP response to handle, as received from an AWS service.executionAttributes
- The attributes attached to this particular execution.- Returns:
- An object of type T, as defined by individual implementations.
-
builder
- Returns:
- New Builder instance.
-