public class DecorateErrorFromResponseBodyUnmarshaller extends Object implements Function<AwsXmlUnmarshallingContext,AwsXmlUnmarshallingContext>
AwsXmlUnmarshallingContext that already contains the parsed XML of the
response body with parsed error XML if the HTTP response status indicates failure or a serialized error is found
in the XML body of a 'successful' response. This is a non-standard error handling behavior that is used by some
non-streaming S3 operations.| Modifier and Type | Method and Description |
|---|---|
AwsXmlUnmarshallingContext |
apply(AwsXmlUnmarshallingContext context) |
static DecorateErrorFromResponseBodyUnmarshaller |
of(Function<XmlElement,Optional<XmlElement>> errorRootFunction)
Constructs a function that can be used to decorate a parsed error from a response if one is found.
|
public static DecorateErrorFromResponseBodyUnmarshaller of(Function<XmlElement,Optional<XmlElement>> errorRootFunction)
errorRootFunction - A function that can be used to locate the root of the serialized error in the XML
body if the HTTP status code of the response indicates an error. This function is not
applied for HTTP responses that indicate success, instead the root of the document
will always be checked for an element tagged 'Error'.public AwsXmlUnmarshallingContext apply(AwsXmlUnmarshallingContext context)
apply in interface Function<AwsXmlUnmarshallingContext,AwsXmlUnmarshallingContext>Copyright © 2020. All rights reserved.