Skip to content

Commit

Permalink
fix: add error logging for Exec method (#21)
Browse files Browse the repository at this point in the history
- Add error logging for WaitUntilFunctionUpdated call in Exec method

fix #12 

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy authored Apr 1, 2023
1 parent dca8512 commit b3e236e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,12 @@ func (p Plugin) Exec() error {
svc := lambda.New(sess, config)

if isUpdateConfig {

// if err := svc.WaitUntilFunctionActive(&lambda.GetFunctionConfigurationInput{
// FunctionName: aws.String(p.Config.FunctionName),
// }); err != nil {
// log.Println(err.Error())
// return err
// }
if err := svc.WaitUntilFunctionUpdated(&lambda.GetFunctionConfigurationInput{
FunctionName: aws.String(p.Config.FunctionName),
}); err != nil {
log.Println(err.Error())
return err
}

// UpdateFunctionConfiguration API operation for AWS Lambda.
result, err := svc.UpdateFunctionConfiguration(cfg)
Expand Down

0 comments on commit b3e236e

Please sign in to comment.