@ThreadSafe public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Field and Description |
---|---|
static JsonErrorUnmarshaller |
DEFAULT_UNMARSHALLER |
private java.lang.String |
handledErrorCode |
private static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
exceptionClass
Constructor and Description |
---|
JsonErrorUnmarshaller(java.lang.Class<? extends AmazonServiceException> exceptionClass,
java.lang.String handledErrorCode) |
Modifier and Type | Method and Description |
---|---|
boolean |
matchErrorCode(java.lang.String actualErrorCode) |
AmazonServiceException |
unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) |
newException
public static final JsonErrorUnmarshaller DEFAULT_UNMARSHALLER
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
private final java.lang.String handledErrorCode
public JsonErrorUnmarshaller(java.lang.Class<? extends AmazonServiceException> exceptionClass, java.lang.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 java.lang.Exception
java.lang.Exception
public boolean matchErrorCode(java.lang.String actualErrorCode)
actualErrorCode
- Actual AWS error code found in the error response.