Skip to content

SendTaskFailure

Source: src/AWS/StepFunctions/SendTaskFailure.ts

Runtime binding for states:SendTaskFailure.

Fails a callback-pattern task (.waitForTaskToken) or an Activity task. Bind without arguments for task tokens issued by service-integration Task states, or pass an Activity to scope access.

const sendTaskFailure = yield* StepFunctions.SendTaskFailure();
yield* sendTaskFailure({
taskToken: token,
error: "ApprovalRejected",
cause: "the reviewer rejected the request",
});