文档

状态码说明

更新时间:
一键部署

本文主要介绍在开发过程中接入阿里云百炼,出现的错误码以及对应的错误原因。

状态码参考

阿里云百炼模型服务的API调用将返回状态码以标识调用结果。通用状态码由阿里云百炼约定,各算法模型还可能在通用状态码的基础上增加自定义的状态码和状态信息。请通过返回结果中的codestatus字段定位调用成功或失败的详细信息。

Http返回码

错误代码 Code

错误信息 Message

(具体信息内容可能跟随场景有所变化)

含义说明

400

InvalidParameter

Required parameter(s) missing or invalid, please check the request parameters.

接口调用参数不合法

400

DataInspectionFailed

Input or output data may contain inappropriate content.

数据检查错误,输入或者输出包含疑似敏感内容被绿网拦截

400

BadRequest.EmptyInput

Required input parameter missing from request.

请求的输入不能为空

400

BadRequest.EmptyParameters

Required parameter "parameters" missing from request.

请求的参数不能为空

400

BadRequest.EmptyModel

Required parameter "model" missing from request.

请求输入的模型不能为空

400

InvalidURL

Invalid URL provided in your request.

请求的 URL 错误

400

Arrearage

Access denied, plesase make sure your account is in good standing.

客户账户因为欠费而被拒绝访问

400

UnsupportedOperation

The operation is unsupported on the referee object.

关联的对象不支持该操作(可以根据实际情况修改)

400

FlowNotPublished

Flow has not published yet, please publish flow and try again.

流程未发布,请发布流程后再重试。

400

InvalidSchema

Database schema is invalid for text2sql.

请输入数据库Schema信息。

400

InvalidSchemaFormat

Database schema format is invalid for text2sql.

输入数据表信息格式异常。

400

FaqRuleBlocked

Input or output data is blocked by faq rule.

命中FAQ规则干预模块。

400

CustomRoleBlocked

Input or output data may contain inappropriate content with custom rule.

请求或响应内容没有通过自定义策略。

401

InvalidApiKey

Invalid API-key provided.

请求中的 ApiKey 错误

403

AccessDenied

Access denied.

无权访问此 API,比如不在邀测中

403

Workspace.AccessDenied

Workspace access denied.

无权限访问业务空间的应用或者模型。请检查是否传入了正确的workspace。

应用调用请参考文档业务空间传递业务空间标识。

模型调用请参考文档业务空间模型调用传递业务空间标识。

403

Model.AccessDenied

Model access denied.

子账号无权限访问业务空间的模型。请确认以下步骤 :

  1. 调用时,是否传入了业务空间标识(目前子账号无法访问默认业务空间的应用或模型)。

  2. 是否已对子账号访问的业务空间做了授权。

  3. 是否对访问的业务空间做了模型的访问授权。

具体详情请参考文档业务空间模型调用的前提条件。

403

AccessDenied.Unpurchased

Access to model denied. Please make sure you are eligible for using the model.

客户没有开通此商品

404

WorkSpaceNotFound

WorkSpace can not be found.

用户空间信息不存在。

404

ModelNotFound

Model can not be found.

当前访问的模型不存在。

408

RequestTimeOut

Request timed out, please try again later.

请求超时

413

BadRequest.TooLarge

Payload Too Large

接入层网关返回请求体过大错误,如果错误是由MSE网关层直接拦截,则没有 code,并且 message 不能自定义。如果是RESTful网关拦截,则返回code。

415

BadRequest.InputDownloadFailed

Failed to download the input file: xxx

下载输入文件失败,可能是由于下载超时、下载失败或者文件超过限额大小,错误信息可以指出更细节的内容。

415

BadRequest.UnsupportedFileFormat

Input file format is not supported.

输入文件的格式不支持。

429

Throttling

Requests throttling triggered.

接口调用触发限流

429

Throttling.RateQuota

Requests rate limit exceeded, please try again later.

调用频次触发限流,比如每秒钟请求数

429

Throttling.AllocationQuota

Allocated quota exceeded, please increase your quota limit.

一段时间调用量触发限流,比如每分钟生成Token数

429

Throttling.AllocationQuota

Free allocated quota exceeded.

免费额度已经耗尽,并且模型未开通计费访问。

429

PrepaidBillOverdue

The prepaid bill is overdue.

业务空间预付费账单到期。

429

PostpaidBillOverdue

The postpaid bill is overdue.

模型推理商品已失效。

429

CommodityNotPurchased

Commodity has not purchased yet.

业务空间未订购。

500

InternalError

An internal error has occured, please try again later or contact service support.

内部错误

500

InternalError.Algo

An internal error has occured during execution, please try again later or contact service support.

内部算法错误

500

SystemError

An system error has occured, please try again later.

系统错误

500

InternalError.Timeout

An internal timeout error has occured during execution, please try again later or contact service support.

异步任务从网关提交给算法服务层之后等待时间 3 小时,如果 3 小时始终没有结果,则超时。

500

RewriteFailed

Failed to rewrite content for prompt.

调用改写prompt的大模型失败。

500

RetrivalFailed

Failed to retrieve data from documents.

文档检索失败。

500

AppProcessFailed

Failed to proceed application request.

应用流程处理失败。

500

ModelServiceFailed

Failed to request model service.

模型服务调用失败。

500

InvokePluginFailed

Failed to invoke plugin.

插件调用失败。

503

ModelUnavailable

Model is unavailable, please try again later.

模型暂时无法提供服务。

返回字段参考

阿里云百炼模型服务在访问失败的情况下,除 HTTP 状态码外还会返回错误的细节信息,一个访问失败示例的调用可能有如下所示返回:

{
  	"request_id": "54dc32fd-968b-4aed-b6a8-ae63d6fda4d5",
  	"code": "InvalidApiKey",
  	"message": "The API key in your request is invalid."
}

  • 返回参数说明

返回参数

类型

说明

Http 请求返回码

integer

200(HTTPStatus.OK)表示请求成功,否则表示请求失败,可以通过code获取错误码,通过message字段获取错误详细信息。

request_id

string

系统对一次API调用赋予的唯一标识。当排查问题的时候,开发者可以将request_id进行反馈以定位某次调用。

code

string

如果失败表示错误码,参考错误码表“错误代码”部分。

message

string

如果失败,内容为失败详细信息,参考错误码表“错误信息”部分,需要注意的是这部分内容可能会随着具体的情况有所不同,可能会输出更加有针对性的内容,不一定和上述码表中的信息完全一致。

  • 本页导读 (1)
文档反馈