@ThreadSafe public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Field and Description |
---|---|
static JsonErrorUnmarshaller |
DEFAULT_UNMARSHALLER |
Constructor and Description |
---|
JsonErrorUnmarshaller(Class<? extends SdkServiceException> exceptionClass,
String handledErrorCode) |
Modifier and Type | Method and Description |
---|---|
boolean |
matchErrorCode(String actualErrorCode) |
SdkServiceException |
unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) |
public static final JsonErrorUnmarshaller DEFAULT_UNMARSHALLER
public JsonErrorUnmarshaller(Class<? extends SdkServiceException> exceptionClass, String handledErrorCode)
exceptionClass
- Exception class this unmarshaller will attempt to deserialize error response intohandledErrorCode
- AWS error code that this unmarshaller handles. Pass null to handle all exceptionspublic SdkServiceException unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) throws Exception
Exception
public boolean matchErrorCode(String actualErrorCode)
actualErrorCode
- Actual AWS error code found in the error response.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.