Skip to content

Commit

Permalink
revert #108 to fix #237 (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoffatt committed Feb 12, 2020
1 parent abc9ba2 commit b03d958
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cfn/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
r.PhysicalResourceID, r.Data, err = lambdaFunction(ctx, event)
funcDidPanic = false

if r.PhysicalResourceID == "" {
log.Println("PhysicalResourceID must exist, copying Log Stream name")
r.PhysicalResourceID = lambdacontext.LogStreamName
}
if err != nil {
r.Status = StatusFailed
r.Reason = err.Error()
log.Printf("sending status failed: %s", r.Reason)
} else {
r.Status = StatusSuccess

if r.PhysicalResourceID == "" {
log.Println("PhysicalResourceID must exist on creation, copying Log Stream name")
r.PhysicalResourceID = lambdacontext.LogStreamName
}
}

err = r.sendWith(client)
Expand Down

0 comments on commit b03d958

Please sign in to comment.