错误码
更新时间:2024-11-01
错误码说明
本文主要介绍推理服务API V2对应的错误码及其错误描述。在调用API请求后,可以通过返回的错误码、错误信息及排查建议等进行问题排查。
数据结构
若请求错误,服务器将以JSON格式返回错误信息,错误信息包含:
code:错误码。
msg:错误描述信息,帮助理解和解决发生的错误。
type:错误描类型。
{
"error":
{
"code":"malformed_json",
"message":"Invalid Argument",
"type":"invalid_request_error"
},
"id":"as-t2z8xi6mm8"
}
错误码列表
HTTP状态码 | 类型 | 错误码 | 错误信息 |
---|---|---|---|
400 | invalid_request_error | malformed_json | Invalid JSON |
400 | invalid_request_error | invalid_model | model is empty |
400 | invalid_request_error | malformed_json | Invalid Argument |
400 | invalid_request_error | malformed_json | 返回的具体错误信息 |
400 | invalid_request_error | invalid_messages | 返回的具体错误信息 |
400 | invalid_request_error | characters_too_long | the max input characters is xxx |
400 | invalid_request_error | invalid_user_id | user_id can not be empty |
400 | invalid_request_error | tokens_too_long | Prompt tokens too long |
401 | access_denied | no_parameter_permission | 返回的具体错误信息 |
401 | invalid_request_error | invalid_model | No permission to use the model |
401 | invalid_request_error | invalid_appid | No permission to use the appid |
401 | invalid_request_error | invalid_iam_token | IAM Certification failed |
403 | unsafe_request | system_unsafe | the content of system field is invalid |
403 | unsafe_request | user_setting_unsafe | the content of user field is invalid |
403 | unsafe_request | functions_unsafe | the content of functions field is invalid |
404 | invalid_request_error | no_such_model | |
405 | invalid_request_error | method_not_supported | Only POST requests are accepted |
429 | rate_limit_exceeded | rpm_rate_limit_exceeded | Rate limit reached for RPM |
429 | rate_limit_exceeded | tpm_rate_limit_exceeded | Rate limit reached for TPM |
429 | rate_limit_exceeded | preemptible_rate_limit_exceeded | Rate limit reached for preemptible resource |
429 | rate_limit_exceeded | user_rate_limit_exceeded | qps request limit by APP ID reached |
429 | rate_limit_exceeded | cluster_rate_limit_exceeded | request limit by resouce cluster reached |
500 | Internal_error | internal_error | Internal error |
500 | Internal_error | dispatch_internal_error | Internal error |