steven0711dong commented on a change in pull request #479: Trigger parameter
issue
URL: https://github.com/apache/openwhisk-cli/pull/479#discussion_r383471254
##########
File path: commands/trigger.go
##########
@@ -547,15 +640,24 @@ func (t *Trigger) Update(Client *whisk.Client, args
[]string) error {
retTrigger, httpResp, err :=
Client.Triggers.Get(qualifiedName.GetEntityName())
if err != nil && httpResp.StatusCode == 404 {
- t.Create(Client, args)
+ if createErr := t.Create(Client, args); createErr != nil {
Review comment:
Correct.
1. If `trigger get` fails with 404, then we create the trigger. If creating
the triggers fails, we have to report back to the user. Previously we do not
report any error when we create trigger in update and that was a bug.
2. If `trigger get` fails with other reason, execution will fall into next
else if, and we report the error message as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services