Reports that a specified task fails to be executed.
Description
If you call this operation to call back the task steps of pattern: waitForCallback, it indicates that the current task fails to be executed.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ReportTaskFailed |
The operation that you want to perform. Set the value to ReportTaskFailed. |
Error | String | Yes | nill |
The error code for the failed task. |
TaskToken | String | Yes | emptyString |
The token for reporting the task status. |
Cause | String | No | emptyString |
The cause of the failure. |
RequestId | String | No | testRequestId |
The ID of the request. If you specify this parameter, the system uses its value as the request ID. By default, the system generates a random value. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
EventId | Long | 1 |
The ID of the task. |
RequestId | String | emptyString |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ReportTaskFailed
&Error=emptyString
&TaskToken=emptyString
&<Common request parameters>
Sample success responses
XML
format
<ReportTaskFailedResponse>
<Description>Response in XML format is not supported. </Description>
</ReportTaskFailedResponse>
JSON
format
{
"RequestId":"testRequestId",
"EventId":1
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
403 | AccessDenied | The resources doesn't belong to you. | The error message returned because request authentication failed. For more information, see the actual error message. |
400 | ActionNotSupported | The requested API operation '%s' is incorrect. Please check. | The error message returned because the request method is wrong. For more information, see the API documentation and check the spelling. |
400 | APIVersionNotSupported | The requested API version '%s' is not supported yet. Please check. | The error message returned because the requested API version is wrong. For more information, see Make API requests. |
400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | The error message returned because the request message body is too large. |
500 | InternalServerError | An internal error has occurred. Please retry. | The error message returned because an internal server error has occurred. Try again later. |
403 | InvalidAccessKeyID | The AccessKey ID %s is invalid. | The error message returned because the AccessKey ID is invalid. |
400 | InvalidArgument | Parameter error. | The error message returned because the request parameters are invalid. For more information, see the actual error message. |
400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | The error message returned because the required request parameters are missing. For more information, see the actual error message. |
400 | MissingRequiredParams | The HTTP query '%s' must be specified. | The error message returned because the required request parameters are missing. For more information, see the actual error message. |
403 | RequestTimeTooSkewed | The difference between the request time %s and the current time %s is too large. | The error message returned because your request time is wrong. The request has been identified as invalid. For more information, see the "Common parameters" section. |
429 | ResourceThrottled | The request is throttled. Please try again later. | The error message returned because the request is throttled for some reason. Try again later. |
403 | SignatureNotMatch | The request signature we calculated does not match the signature you provided. Check your access key and signing method. | The error message returned because the request signature we calculated does not match the request signature you provided. Check your signature algorithm and AccessKey secret. |
415 | UnsupportedMediaType | The content type must be "application/json". | The error message returned because the type of the request message body is wrong. |
400 | TaskAlreadyCompleted | Task %s has already completed. | The error message returned because the specified task has been completed. |
409 | TaskInvalidState | Task is in an invalid state, please retry. | The error message returned because the specified task is in an invalid state. Try again later. |
For a list of error codes, visit the API Error Center.
For a list of error codes, visit the API Error Center.