Skip to content

aws-cdk-lib/triggers: Confusing/missing explanation on trigger failures #26341

@archevel

Description

@archevel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/triggersRelated to the triggers packagebugThis issue is a bug.documentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions