调用ReportTaskFailed汇报指定的任务执行失败。
接口说明
- 使用该接口回调
pattern: waitForCallback
的任务步骤,表明当前任务执行失败。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ReportTaskFailed |
系统规定参数。取值:ReportTaskFailed。 |
Error | String | 是 | nill |
失败错误代码。 |
TaskToken | String | 是 | emptyString |
汇报任务指定的令牌。 |
RequestId | String | 否 | testRequestId |
如果您指定了该值,系统将使用该值作为本次请求的ID。默认系统会随机生成。 |
Cause | String | 否 | emptyString |
失败错误原因。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
EventId | Long | 1 |
任务ID。 |
RequestId | String | emptyString |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ReportTaskFailed
&Error=emptyString
&TaskToken=emptyString
&<公共请求参数>
正常返回示例
XML
格式
<ReportTaskFailedResponse>
<Description>Response in XML format is not supported.</Description>
</ReportTaskFailedResponse>
JSON
格式
{
"EventId": 1,
"RequestId": "testRequestId"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | AccessDenied | The resources doesn't belong to you. | 请求鉴权未通过,具体内容请参考实际错误信息 |
400 | ActionNotSupported | The requested API operation '%s' is incorrect. Please check. | 所请求方法错误。请参照api文档并检查拼写 |
400 | APIVersionNotSupported | The requested API version '%s' is not supported yet. Please check. | 所请求接口版本不正确。请参考api简介 |
400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | 请求消息体过大。 |
500 | InternalServerError | An internal error has occurred. Please retry. | 服务器内部错误。请稍后重试。 |
403 | InvalidAccessKeyID | The AccessKey ID %s is invalid. | access key ID无效。 |
400 | InvalidArgument | Parameter error. | 请求参数错误。具体内容请参考实际错误信息。 |
400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | 请求所需参数缺失。具体内容请参考实际错误信息。 |
400 | MissingRequiredParams | The HTTP query '%s' must be specified. | 请求所需参数缺失。具体内容请参考实际错误信息。 |
403 | RequestTimeTooSkewed | The difference between the request time %s and the current time %s is too large. | 您的请求时间不正确,该请求已被识别为无效。请参考通用参数一节。 |
429 | ResourceThrottled | The request is throttled. Please try again later. | 因某些原因系统流量已达瓶颈。请稍后重试。 |
403 | SignatureNotMatch | The request signature we calculated does not match the signature you provided. Check your access key and signing method. | 您发起请求的签名与我们计算不一致,请检查您的签名算法及access key secret。 |
415 | UnsupportedMediaType | The content type must be "application/json". | 请求消息体类型错误。 |
400 | TaskAlreadyCompleted | Task %s has already completed. | 指定任务已经完成。 |
409 | TaskInvalidState | Task is in an invalid state, please retry. | 任务目前在无效的状态,请稍后重试。 |
访问错误中心查看更多错误码。