use of com.amazonaws.services.geo.model.ValidationException in project aws-sdk-android by aws-amplify.
the class ValidationExceptionUnmarshaller method unmarshall.
@Override
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
ValidationException e = (ValidationException) super.unmarshall(error);
e.setErrorCode("ValidationException");
final AwsJsonReader jsonReader = JsonUtils.getJsonReader(new StringReader(error.get("FieldList")));
e.setFieldList(new ListUnmarshaller<ValidationExceptionField>(ValidationExceptionFieldJsonUnmarshaller.getInstance()).unmarshall(new JsonUnmarshallerContext(jsonReader)));
e.setReason(String.valueOf(error.get("Reason")));
return e;
}
Aggregations