Describe the issue
From the docs about trigger failures:
If the trigger handler fails (e.g. an exception is raised), the CloudFormation deployment will fail, as if a resource failed to provision.
However, when the invocationType in the trigger's props is triggers.InvocationType.EVENT a deployment will succeed regardless of if an error is thrown in the handler body. The quoted statement is true if triggers.InvocationType.REQUEST_RESPONSE is used however. Since the example code snippet of a trigger uses triggers.InvocationType.EVENT it gives the impression that the deployment will fail if an exception is raised in the handler for the event. Perhaps this is an actual bug in this case, but if it works as intended then it would be good to be explicit about the effect of the different invocationTypes in the documentation.
Links
aws-cdk-lib
Describe the issue
From the docs about trigger failures:
However, when the
invocationTypein the trigger's props istriggers.InvocationType.EVENTa deployment will succeed regardless of if an error is thrown in the handler body. The quoted statement is true iftriggers.InvocationType.REQUEST_RESPONSEis used however. Since the example code snippet of a trigger usestriggers.InvocationType.EVENTit gives the impression that the deployment will fail if an exception is raised in the handler for the event. Perhaps this is an actual bug in this case, but if it works as intended then it would be good to be explicit about the effect of the differentinvocationTypes in the documentation.Links
aws-cdk-lib