@ThreadSafe public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Field and Description |
---|---|
static JsonErrorUnmarshaller |
DEFAULT_UNMARSHALLER |
exceptionClass
Constructor and Description |
---|
JsonErrorUnmarshaller(Class<? extends AmazonServiceException> exceptionClass,
String handledErrorCode) |
Modifier and Type | Method and Description |
---|---|
boolean |
matchErrorCode(String actualErrorCode) |
AmazonServiceException |
unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) |
newException
public static final JsonErrorUnmarshaller DEFAULT_UNMARSHALLER
public JsonErrorUnmarshaller(Class<? extends AmazonServiceException> 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 AmazonServiceException 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 © 2018. All rights reserved.