Skip to content

Commit

Permalink
Additional validation on Describe Container Instances
Browse files Browse the repository at this point in the history
  • Loading branch information
nithu0115 committed Feb 13, 2019
1 parent 6053543 commit 1a8f128
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func describeContainerInstancesAttributeMap(context *cli.Context, ecsClient ecsc

descrContainerInstancesAttributes, err := ecsClient.GetAttributesFromDescribeContainerInstances(containerInstanceIdentifiers)
if err != nil {
return nil, errors.Wrapf(err, fmt.Sprintf("Failed to Describe Container Instances, please check region/containerInstance values"))
return nil, errors.Wrapf(err, fmt.Sprintf("Failed to Describe Container Instances, please check region/containerInstance/cluster values"))
}
return descrContainerInstancesAttributes, err
}
Expand Down
3 changes: 3 additions & 0 deletions ecs-cli/modules/clients/aws/ecs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ func (c *ecsClient) GetAttributesFromDescribeContainerInstances(containerInstanc
if err != nil {
return nil, err
}
if len(descrContainerInstances.Failures) != 0 {
return nil, fmt.Errorf("Failures %v", descrContainerInstances.Failures)
}
for _, containerInstance := range descrContainerInstances.ContainerInstances {
var containerInstanceAttributeNames []*string
for _, containerInstanceattributenames := range containerInstance.Attributes {
Expand Down

0 comments on commit 1a8f128

Please sign in to comment.