Amazon.ApplicationAutoScaling.Model.Internal.MarshallTransformations.DescribeScalableTargetsResponseUnmarshaller.UnmarshallException C# (CSharp) Method

UnmarshallException() public method

Unmarshaller error response to exception.
public UnmarshallException ( JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode ) : AmazonServiceException
context JsonUnmarshallerContext
innerException Exception
statusCode HttpStatusCode
return AmazonServiceException
        public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
        {
            ErrorResponse errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
            if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentUpdateException"))
            {
                return new ConcurrentUpdateException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException"))
            {
                return new InternalServiceException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidNextTokenException"))
            {
                return new InvalidNextTokenException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
            {
                return new ValidationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            return new AmazonApplicationAutoScalingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
        }
DescribeScalableTargetsResponseUnmarshaller