Reports a failed task.
Operation description
Usage notes
In the old version of CloudFlow, the task step that ReportTaskFailed is used to call back pattern: waitForCallback
indicates that the current task fails to be executed.
In the new version of CloudFlow, the task step that ReportTaskFailed is used to call back TaskMode: WaitForCustomCallback
indicates that the current task fails to be executed.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RequestId | string | No | The request ID. If you specify this parameter, the system uses this value as the ID of the request. If you do not specify this parameter, the system generates a value at random. | testRequestId |
TaskToken | string | Yes | The token of the specified task that you want to report. If this parameter appears in waitforCallback mode, the parameter is passed to the called service, such as Message Service (MNS) or Function Compute. For MNS, the value of this parameter can be obtained from a message. For Function Compute, the value of this parameter can be obtained from an event. | emptyString |
Error | string | Yes | The error code for the failed task. The value must be 1 to 128 characters in length. | nill |
Cause | string | No | The cause of the failure. The value must be 1 to 4,096 characters in length. | emptyString |
Response parameters
Examples
Sample success responses
JSON
format
{
"EventId": 1,
"RequestId": "testRequestId"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ActionNotSupported | The requested API operation '%s' is incorrect. Please check. | - |
400 | APIVersionNotSupported | The requested API version '%s' is not supported yet. Please check. | - |
400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | The payload size exceeds maximum allowed size (%s bytes). |
400 | InvalidArgument | Parameter error. | Parameter error. |
400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | The HTTP header '%s' must be specified. |
400 | MissingRequiredParams | The HTTP query '%s' must be specified. | The HTTP query '%s' must be specified. |
400 | TaskAlreadyCompleted | Task %s has already completed. | Task %s has already completed. |
403 | AccessDenied | The resources doesn't belong to you. | - |
403 | InvalidAccessKeyID | The AccessKey ID %s is invalid. | The AccessKey ID %s is invalid. |
403 | RequestTimeTooSkewed | The difference between the request time %s and the current time %s is too large. | The difference between the request time %s and the current time %s is too large. |
403 | SignatureNotMatch | The request signature we calculated does not match the signature you provided. Check your access key and signing method. | The calculated signature of the request does not match the signature you provided. Check your AccessKey Secret and signing algorithm. |
409 | TaskInvalidState | Task is in an invalid state, please retry. | Task is in an invalid state, please retry. |
415 | UnsupportedMediaType | The content type must be "application/json". | The content type must be "application/json". |
429 | ResourceThrottled | The request is throttled. Please try again later. | The request is throttled. Please try again later. |
500 | InternalServerError | An internal error has occurred. Please retry. | An internal error has occurred. Please retry. |
For a list of error codes, visit the Service error codes.