Error code descriptions

更新时间:
复制 MD 格式

Errors are categorized into three types based on the system layer in which they occur: API Gateway layer errors, business gateway layer errors, and business application layer errors.

  1. API Gateway layer errors

    • How to identify: You can identify these errors by the HTTP status code. A status code other than 200 indicates an API Gateway error.

    • Common issues: Invalid request body format, authentication failure, and circuit breaking.

  2. Business gateway layer errors

    • How to identify: You can identify these errors by the `status` field in the response body. A `status` value other than 10 indicates a business gateway error.

    • Common issues: Timeout when calling a downstream business system, call errors, or general validation failure.

  3. Business application layer errors

    • How to identify: If the business gateway `status` is 20 and the `errorCode` is B_API_ServiceError, an error occurred in the downstream business application.

    • Details: In this case, the `subErrCode` and `subErrMessage` fields contain the specific error code and error message from the downstream business application. These error codes are provided in the documentation for each specific API.

Example:

HTTP/1.1 200 OK          // API Gateway status code. 200: success
{
    "status": 10,        // Business gateway status code. 10: success, 20: failed
    "apiInvokeId": "i_66c587a7c6fd500028c10e78",
    "data": {
        "taskId": "01j5ssksqndptm3exv751bz0gj",
        "status": "waiting"
    },
    "subErrCode": null,   // Business application error code
    "subErrMessage": null,// Business application error details
    "errCode": null,      // Business gateway error code
    "errMessage": null,   // Business gateway error details
}

API Gateway instance error codes

These errors correspond to HTTP status codes other than 200.

For more information, see API Gateway error codes (VPC-connected instances).

Business gateway error codes

Gateway status code (status)

Gateway error code (errCode)

Error message

(errMessage)

20

B_API_ServiceError

Service invocation failed because the downstream service returned an error.

20

B_API_InvokeTimeout

The business gateway timed out when calling the downstream service.

20

B_API_CauseFlowControl

Throttling was triggered at the business gateway layer: {throttling_content}

20

B_API_AuditFailed

The request parameter contains sensitive content and was blocked by Content Moderation at the gateway layer.

Business application error codes

See the documentation for each specific API.