Search in sources :

Example 1 with ValidationException

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;
}
Also used : ValidationException(com.amazonaws.services.geo.model.ValidationException) ListUnmarshaller(com.amazonaws.transform.ListUnmarshaller) StringReader(java.io.StringReader) JsonUnmarshallerContext(com.amazonaws.transform.JsonUnmarshallerContext) AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Aggregations

ValidationException (com.amazonaws.services.geo.model.ValidationException)1 JsonUnmarshallerContext (com.amazonaws.transform.JsonUnmarshallerContext)1 ListUnmarshaller (com.amazonaws.transform.ListUnmarshaller)1 AwsJsonReader (com.amazonaws.util.json.AwsJsonReader)1 StringReader (java.io.StringReader)1