SFN / Client / send_task_failure
send_task_failure#
- SFN.Client.send_task_failure(**kwargs)#
Used by activity workers, Task states using the callback pattern, and optionally Task states using the job run pattern to report that the task identified by the
taskToken
failed.For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.
A caller can mark a task as fail without using any KMS permissions in the execution role if the caller provides a null value for both
error
andcause
fields because no data needs to be encrypted.See also: AWS API Documentation
Request Syntax
response = client.send_task_failure( taskToken='string', error='string', cause='string' )
- Parameters:
taskToken (string) –
[REQUIRED]
The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the context object when a workflow enters a task state. See GetActivityTaskOutput$taskToken.
error (string) – The error code of the failure.
cause (string) – A more detailed explanation of the cause of the failure.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions