@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
jsonContent
- The JsonNode
for the error to un-marshall. Can be null.AmazonServiceException
created from the jsonContent or null if one couldn't be found.Exception
- If there are issues processing the jsonContent.public boolean matchErrorCode(String actualErrorCode)
actualErrorCode
- Actual AWS error code found in the error response.Copyright © 2021. All rights reserved.