错误码
在调用MaaS部署的模型服务时,可能出现的错误码及相关信息如下。
HTTP状态码 |
错误码 |
错误信息 |
说明 |
---|---|---|---|
400 |
ModelArts.81001 |
Invalid request body. |
解析body体失败,如JSON格式化失败、model参数为空。 |
400 |
ModelArts.81002 |
Failed to get the authorization header. |
请求头中Authorization为空,或者Authorization格式不是Bearer开头。 |
401 |
ModelArts.81003 |
Invalid authorization header. |
API Key解析失败。 |
401 |
ModelArts.81004 |
Invalid request because you do not have access to it. |
未开通预置服务。 |
401 |
ModelArts.81005 |
The free quota has been used up. |
免费额度已用完。 |
401 |
ModelArts.81006 |
The resource is frozen. |
常驻模型已冻结。 |
401 |
ModelArts.81109 |
No permission query task %s |
没有查询该视频生成任务的权限。 |
403 |
ModelArts.81011 |
May contain senstive..... |
输入或者非流式输出风控。 |
404 |
ModelArts.81009 |
Invalid model. |
请求体中的model参数传入的模型不存在。 |
404 |
ModelArts.81108 |
Task %s does not exist |
任务不存在。 |
429 |
ModelArts.81101 |
Too many requests, exceeded rate limit is {rpm} times per minute. |
RPM流控校验失败。 |
429 |
ModelArts.81103 |
Too many requests. exceeded rate limit is %s tokens per minute. |
TPM流控校验失败。 |
403 |
ModelArts.81109 |
No permission query task %s |
无权限查询此任务。 |
5XX |
APIG.0203 |
"error_msg":"Backend timeout",error_code:APIG.0203 |
请求的服务响应超时。 |
400 |
"object": "error" |
"object": "error", "message": "[{'type': 'missing', 'loc': ('body', 'model'), 'msg': 'Field required', 'input': {'max_tokens': 20, 'messages': [{'role': 'system', 'content': 'You are a helpful assistant.'}, {'role': 'user', 'content': '你好'}], 'stream': False, 'temperature': 1.0}}]", "type": "BadRequestError", "param": null, "code": 400 |
请求体中缺失必填参数。 |
400 |
"object": "error" |
"object": "error", "message": "[{'type': 'extra_forbidden', 'loc': ('body', 'test'), 'msg': 'Extra inputs are not permitted', 'input': 15}]", "type": "BadRequestError", "param": null, "code": 400 |
请求体中包含不支持的额外请求参数。 |
400 |
"object": "error" |
"object": "error", "message": "[{'type': 'json_invalid', 'loc': ('body', 273), 'msg': 'JSON decode error', 'input': {}, 'ctx': {'error': \"Expecting ',' delimiter\"}}]", "type": "BadRequestError", "param": null, "code": 400 |
请求体json格式错误。 |
400 |
"object": "error" |
"object": "error", "message": "[{'type': 'missing', 'loc': ('body',), 'msg': 'Field required', 'input': None}]", "type": "BadRequestError", "param": null, "code": 400 |
无请求体。 |
400 |
"object": "error" |
"object": "error", "message": "This model's maximum context length is 4096 tokens. However, you requested 8242 tokens (20 in the messages, 8222 in the completion). Please reduce the length of the messages or completion.", "type": "BadRequestError", "param": null, "code": 400 |
max_tokens设置超出模型支持的上限。 |
404 |
"object": "error" |
"object": "error", "message": "The model `DeepSeek-R1` does not exist.", "type": "NotFoundError", "param": null, "code": 404 |
请求体中model参数填写错误。 |
404 |
APIG.0101 |
"error_msg": "The API does not exist or has not been published in the environment", "error_code": "APIG.0101", "request_id": "d0ddda0fcdd0cc23a1588fafe426****" |
请求接口地址错误或不存在。 |
405 |
- |
"detail":"Method Not Allowed" |
采用了错误的请求方式。 |
429 |
APIG.0308 |
"error_msg": "The throttling threshold has been reached: policy ip over ratelimit,limit:5,time:1 minute" |
达到APIG流量控制上限。 |