Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Fix unhandled errors (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujed authored Sep 25, 2023
1 parent 2b1f57e commit 10dd11e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/internal/ecs/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,8 @@ func modifyTaskState(wf *AddWorkflow) (nextState optionals.Optional[AddWorkflowS
printer.Infof("Please start over with a different profile, or add this permission in IAM.\n")
return awf_error(errors.New("Failed to update the ECS task definition due to insufficient permissions."))
}
printer.Errorf("Could not register an ECS task definition. The error from the AWS library is shown below. Please send this log message to [email protected] for assistance.\n", err)
return awf_error(errors.Wrap(err, "Error registering task definition"))
}
printer.Infof("Registered task definition %q revision %d.\n",
aws.ToString(output.TaskDefinition.Family),
Expand Down Expand Up @@ -912,6 +914,8 @@ func updateServiceState(wf *AddWorkflow) (nextState optionals.Optional[AddWorkfl
wf.ecsServiceARN, uoe.OperationName)
return awf_error(errors.New("Failed to update the ECS service due to insufficient permissions."))
}
printer.Errorf("Could not update the ECS service %q. The error from the AWS library is shown below. Please send this log message to [email protected] for assistance.\n", wf.ecsServiceARN, err)
return awf_error(errors.Wrapf(err, "Error updating ECS service %q", wf.ecsServiceARN))
}
printer.Infof("Updated service %q with new version of task definition.\n", wf.ecsService)

Expand Down

0 comments on commit 10dd11e

Please sign in to comment.