资讯 社区 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

错误码

本文主要介绍平台功能OpenAPI对应的错误码及其错误描述。在调用API请求后,可以通过返回的错误码、错误信息及排查建议等进行问题排查。如果遇到服务不稳定等问题,可以先尝试通过重试机制解决。

错误码格式

若请求错误,服务器将以JSON格式返回错误信息,错误信息包含:

参数名 类型 说明
requestId String 请求ID
code String 错误码
message String 错误描述信息,帮助理解和解决发生的错误。

错误示例

例如错误返回:

{
  "requestId":"6ba7b810-xxxc04fd430c8",
  "code": "MalformedJSON",
  "message": "The JSON you provided was not well-formed."
}

错误码列表

IAM认证相关

平台功能OpenAPI基于百度智能云IAM认证,认证失败会返回如下错误码

HTTP状态码 错误码 错误信息 错误描述
400 InappropriateJSON The JSON you provided was well-formed and valid, but not appropriate for this operation. 请求中的JSON格式正确,但语义上不符合要求。如缺少某个必需项,或值类型不匹配等。
400 InvalidMarker The marker you provided was invalid. 请求的marker不合法。
400 SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check yourSecret Access Key and signing method. Consultthe service documentation for details. Authorization头域中附带的签名和服务端验证不一致。
400 RequestExpired Request has expired. Timestamp date is . 请求超时。要改成x-bce-date。若请求中只有Date,需将Date转成datetime。
400 InvalidHTTPAuthHeader The Access Key ID you provided does notexist in our records. Authorization头域格式错误。
400 InvalidHTTPRequest There was an error in the body of your HTTP request. HTTP body格式错误。例如不符合指定的Encoding等。
400 InvalidURI Could not parse the specified URI. URI形式不正确。例如一些服务定义的关键词不匹配等。对于ID不匹配的问题,应定义更加具体的错误码,如NoSuchKey。
400 MalformedJSON The JSON you provided was not well-formed. JSON格式不合法。
403 AccessDenied Access denied. 无权限访问对应的资源。
403 IdempotentParameterMismatch The request uses the same client token asa previous, but non-identical request. clientToken对应的API参数不一样。
403 InvalidAccessKeyId The Access Key ID you provided doesnot exist in our records. Access Key ID不存在。
403 OptInRequired A subscription for the service is required. 没有开通对应的服务。
404 InvalidVersion The API version specified was invalid. URI的版本号不合法。
500 InternalError We encountered an internal error Please try again. 所有未定义的其他错误。

模型管理

HTTP状态码
错误码 错误信息 错误描述
400 ModelNotExist 模型不存在 模型不存在
400 ModelNameExists 模型名称已存在 模型名称已存在
400 ModelVersionNotExist 模型版本记录不存在 模型版本记录不存在

Prompt工程

HTTP状态码
错误码 错误信息 错误描述
400 MalformedJSON The JSON you provided was not well-formed. JSON格式不合法
400 EmptyJSONField The field [%s] in JSON is empty. 字段[%s]不可为空
400 InvalidlJSONField The field [%s] in JSON is invalid. 字段[%s]不符合规范
400 InvalidValueForField Invalid value [%s] for field [%s]. 字段[%s]的值[%s]无效
400 InvalidEnumerateValue Invalid value [%s] for field [%s], it can be:[%s]. 字段[%s]值[%v]无效, 有效值可以是:%v
400 InvalidParameters Invalid request body. 入参错误
400 DuplicatedName The name of the entity is dulicated. 实体名称重复
400 NoSuchKey The record with such key does not exist. 记录不存在
400 TemplateCountExceededUnderProject The count of templates under the project exceeds the limit. 项目下模板数量超过最大限制
400 BindingExceeded Each template can only bind [%s] labels at most. 每个模板最多能绑定[%s]个标签
400 MismatchingVariableCount The count of variables does not match that of the content. 模板内容变量个数和变量字段变量个数不匹配
400 EmptyValueForTemplateVariable The variable [%s] in template cannot be empty. 模板里面对应的变量[%s]传值为空
400 MismatchingVariableAndContent The template variables does not match the content. 模板内容和变量不匹配
400 TemplateCountExceeded The count of variables in template exceeds the limit. 模板变量个数超限
400 NoUpdate No update from your request body. 没有字段需要更新
400 LabelCountExceeded The count of labels exceeds the limit. 标签数量超过最大限制
403 AccessDenied Access denied. 没有权限
403 ImmutableSystemTemplate The system template cannot be modified. 预置模板不支持修改
500 InternalError We encountered an internal error. Please try again. 预置模板不支持修改

模型服务

HTTP状态码
错误码
错误信息 错误描述
400 ServiceNameExisted The name of service you provided has existed. 服务名称已存在。
400 ServiceUriExisted The URI of service you provided has existed. 服务uri已存在。
400 ServiceModelNotSupportDeploy The model does not support deployment. 当前模型不支持部署。
400 ServiceModelNotSupportResourceType The model does not support deployment with the kind of resource. Please change to another one. 当前模型不支持当前资源规格部署,请换另一个。
400 ServiceStatusWrong The service does not support this operation. Wrong status. 服务状态异常,不支持当前操作
400 ChargeTypeNotSupportModifyService This kind of service does not support modify. Please change to another charge type. 当前计费类型不支持更新服务。
400 ServiceAPITypeNotSupportChange The API type of service is different from the model's. 所选模型的输出类型和当前服务不一致,不支持更新服务。
400 ServiceAlreayDeployCurrentModel This model has been deployed. 当前模型已部署。
400 ServiceAlreayDeployAnotherModel Other model has been deployed. Please wait for a minute. 其他模型已经发起部署,请等会再操作。

模型精调

HTTP状态码
错误码 错误信息 错误描述
400 JobNameExisted The name of job you provided has existed. 精调作业名称已存在
400 JobNumberExceedLimit The number of jobs has exceeded the limit. 精调作业数量已达到最大值
400 TaskRunningNumberExceedLimit The number of running tasks has exceeded the limit. 当前作业下运行中的精调任务数量已达到最大值
400 TaskHyperParameterConfigInvalid The hyper parameter config of task you provided was invalid. 任务超参配置不合法
400 TaskRunQuoteNotEnough The quote of running task is not enough. 训练额度不足
400 TaskDatasetConfigInvalid The dataset config of task you provided was invalid. 数据配置参数不合法
400 TaskDatasetNotPublished The dataset of task you provided was not published. 数据集未发布
400 TaskDatasetNumberTooSmall The dataset number of task you provided was too small. 发起任务的数据量太小
400 TaskNotSupportIncrementTrain The task you provided does not support incremental training. 当前任务不支持增量训练
400 IncrementTaskNotMatchJob The incremental task you provided does not match the job. 该基础任务与作业基础模型不一致
400 HasRunningTask A finetune task is running. 存在运行中的模型精调任务
400 HasRunningModelJob A job is running. 存在运行中的模型相关任务
400 JobDeleteFailed Failed to delete finetune job. 删除模型精调作业失败
400 TaskDeleteFailed Failed to delete finetune task. 删除模型精调任务失败
400 DontSupportFunctionDataset The current basic model version does not support initiating finetuning using datasets containing function fields. 当前基础模型版本不支持采用包含function字段的数据集发起精调

数据管理

类别 错误码 错误信息
数据管理-公共(Common) ParamFieldNotExistOrEmpty 参数不存在或为空
ParamFieldValueInvalid 参数不合法
ParamsCantBothEmpty 两参数不能同时为空
InternalError 非常抱歉,系统出现错误,请稍后重试
FrequencyLimit 操作太频繁,稍后重试
ParamTypeError 参数类型错误,应为xxx
ParamsCantBothNonEmpty 两参数不能同时为非空
ParamsLengthExceeded 参数长度不能超过xx
ParamsValueBeyondLimit 参数值不能超过边界xx
AuthFailed 无操作权限
InitServiceWithWrongDataType 初始化服务的数据类型错误
InitServiceWithWrongProjectType 初始化服务的标注类型错误
InitServiceWithWrongTemplateType 初始化服务的模版类型错误
ModelIDNotExist xx表中不存在id为xxx的记录
CallClientError 调用xx服务的xx接口报错
InvalidTemplateType 标注模版错误
UpdateFailed 更新数据集信息失败
GetContextFail 无效的上下文
InterfaceNotSatisfy xx未实现xx接口
CurrentUserIsNotPermitted 当前用户没有此操作权限
ValidateFailed 校验xx失败
数据集(Dataset) NotExist 数据集不存在
DatasetNotFound 数据集不存在
UploadFileExtensionErr 文件类型错误
DataTypeNotSupport 不支持当前数据类型
RemarkCantHaveEmoji 数据集备注中不允许含有表情符号
HasEmptyVersion 您还有空的数据集版本可用,无法创建新的数据集版本
GenerateBmlDatasetIDFailed 生成数据集ID失败,请稍后重试
DataTypeNotMatchWithGroup 数据类型与所属数据集组数据类型不匹配
ImportRecordNotExist 数据集没有导入记录
ExportRecordNotExist 数据集没有导出记录
UpdateFailed 更新数据集信息失败
DatasetCantBeEmpty 数据集不能为空
UploadFileExtensionErr 文件类型错误
HasNoPermission 没有权限对数据集进行操作
OpenSourceAvailableOnlyForAdmin 只有管理员可以操作开源数据集
KeywordCantHaveEmoji 查询关键词不允许含有表情符号
数据集组(DatasetGroup) NotExist 数据集组不存在
NameInUse 数据集组名称被占用
NameCantHaveEmoji 数据集组名称不允许含有表情
NameNotInvalid 数据集组名称不合法
UpdateDatasetNameFailed 更新数据集组名称失败
GroupIDDatasetIDNotMatch 数据集组和数据集不匹配
数据集导入(DatasetImport) FilesWithLabelShouldBeAnnotated 按标签导入只能导入已标注信息
FilesWithLabelNotAllowed 当前场景不允许按导入标注数据
FilesWithLabelRepeatedLabel 按标签导入不允许重复标签
UnannotatedDontNeedFilesWithLabel 导入未标注数据不能传入标签
ExtendByLabelSupportOneLabel 从标签导入只能导入到一个标签中
DontSupportExtendByLabel 当前数据集不支持从标签导入
NoLabelForExtend 从标签导入需要标签
ShouldBeZipFileAll 上传压缩包时必须全部都是压缩包
FileNumberWrong 上传文件数量错误
FileNumberExceeded 上传文件类型的数量超出允许的最大数量
InvalidZipFormat 上传压缩包类型不合法
InvalidImportFrom 上传来源不合法
CantDeleteNotEndedRecord 该导出任务尚未结束,不能删除
CantDeleteLastRecord 当前数据集仅有一条记录,无法被删除
ErrorRecordFilePathIsEmpty 该导入错误记录的文件路径为空
数据集导出(DatasetExport) ShouldToDatasetStoragePath 发布、共享只能导出到数据集存储路径
NotDatasetStoragePath 导出到的存储路径与数据集存储路径不符
EmptyEntity 数据集内无实体,不能发起导出
CanOnlyDeleteDefaultRecord 只允许删除普通导出记录
CantDeleteNotEndedRecord 该导出任务尚未结束,不能删除
StoragePathIsEmpty 该导出任务的导出路径为空
数据集发布(DatasetRelease) DatasetTypeNotSupport 当前数据集类型不支持发布
EmptyEntity 数据集内无实体,不能发起发布
DatasetNotLabeled 该数据集未进行标注,不能进行发布操作
NoValidEntity 该数据集不存在有效标注数据,无法发布
MustAnnotateAllEntity 不能发布,必须全部实体标注完毕
资源(Resource) InvalidDirPath 目录名称不合法
DirAlreadyExist 该目录下已存在子目录
InvalidVolume 存储卷不存在
EmptyDefaultStorageVolume 当前项目未绑定默认存储卷,暂不能进行此操作
InvalidStorageFilePath 存储文件路径无效
BosRequired 未开通bos服务
BosFileNameInvalid BOS文件名称不合法,请刷新页面重新上传
BosDirPathInvalid BOS目录格式错误
BosObjectKeyNotDir ObjectKey不是目录
NotBosStorage 当前存储类型不是BOS存储,无法操作
BosDirNotExist 该BOS目录不存在
BosDirPathNoContents BOS目录下无文件
BosBucketEmpty Bucket为空
BosObjectKeyEmpty ObjectKey为空
BosObjectNotExist ObjectKey不存在
CachedUserBosCredentialExpired 缓存的用户BOS临时鉴权已过期
RequestUserBosCredentialExpired 请求获取到的用户BOS临时鉴权已过期
InvalidWebFileURL 分享链接无效
InvalidWebFileURLHost 目前只支持百度BOS、华为OBS、腾讯COS、阿里OSS云存储服务链接
InvalidWebFileType 分享链接文件类型错误
WebFileUrlExpired 分享链接已过有效期
InvalidWebFileURLHeaders 分享链接响应头信息错误
InvalidWebFileURLContentType 分享链接内容类型错误:仅支持zip压缩包
InvalidWebFileURLContentLength 分享链接文件大小错误
NeedSystemComputeResource 资源不足,请先配置系统资源池
NeedComputeResource 当前项目未绑定计算资源池或所绑定的计算资源不足,请进行绑定或增加资源或等待资源释放后再进行操作
DontSupportExportTo 暂不支持此导出目的下载链接
用户(User) CloudIDEmpty 空账号

TPM配额管理/私有资源池服务付费相关

HTTP状态码
错误码 错误信息 错误描述
400 NoRealNameAuthentication The account needs real-name authentication. 百度云账号没有完成实名认证。
400 ExceededPurchaseQuantityLimit Exceeded the purchase quantity limit. 本次购买配额数量超过剩余可购买配额数量,请调整购买数量。
400 ActiveTokensPackageResourcesExisted There are active tokens package resources, so you cannot purchase TPM&RPM resources. 该预置服务存在生效的Tokens量包,不能购买TPM配额。
400 InsufficientInventory TPM&RPM resources inventory is insufficient. TPM配额库存不足,请调整购买数量。
400 CreateOrderFailed Failed to create order. 创建订单失败。
400 ReleaseResourceFailed Failed to release resource. 终止后付费资源失败。
400 SetReleaseTimeFailed Failed to set release time. 设置释放时间失败。
400 InstanceNotExistOrDestroyed The instance does not exist or has been destroyed. 实例不存在或已销毁。
400 InstanceNotSupportDowngrade Prepaid instances do not support downgrade. 预付费的实例不支持降配。
400 DowngradeOperationsTooFrequent Downgrade operations are too frequent. 两次降配操作需间隔60分钟。
400 ComputeUnitInsufficientInventory Compute unit resources inventory is insufficient. 算力单元库存不足,请调整购买副本数量。
400 ResourceResizingCanNotOperate Resource is resizing, cannot operate. 资源变配中,操作失败。
400 ResourceNotExist Resource not exist. 资源不存在。

批量预测

HTTP状态码
错误码 错误信息 错误描述
400 TaskNameExisted The name of task you provided has existed. 批量预测任务名称已存在
400 UnsupportedEndpoint The endpoint of task you provided is not supported. 提供的任务endpoint不被支持
400 NoOpenedBilling No related billing items have been opened. 未开通相关计费项,不可创建批量预测任务
400 TaskRunningNumberExceedLimit The number of running tasks has exceeded the limit. 用户处于运行中的批量任务数量超过最大值5
400 BosUriNotExist The inputBosUri or outputBosUri you provided does not exist. 所提供的inputBosUri或outputBosUri不存在
400 BosUriNotDirectory The inputBosUri or outputBosUri you provided is not a directory. 所提供的inputBosUri或outputBosUri不是一个目录
400 FileSizeExceedLimit The total size of all files in the inputBosUri exceeds the 300M limit. inputBosUri目录下所有文件累计大小超过300M
400 InputBosUriEmpty There are no files in the inputBosUri. inputBosUri目录下没有文件
400 FileNumExceedLimit The number of files in the inputBosUri exceeds the 100 limit. inputBosUri目录下文件数超过100个
400 ParamConfigInvalid Either endpoint or modelId must be set, but not both. endpoint和modelId两参数有且只能有一个
400 ModelNotSupport The model you provided does not support batch inference. 提供的模型不支持批量预测
400 ModelConfigOffline The model you provided has been taken offline, and no longer supports batch inference. 提供的模型已下线,不支持批量预测
400 ModelNotImported The model is currently being imported, please create task after successful import. 模型正在导入过程中,请导入成功以后再发起批量推理任务
400 CreateOrderFailed Failed to create order. 订单创建失败
400 ChargeNotEnough Insufficient balance, please recharge and try again. 余额不足,请充值后再试
400 NoRealNameAuthentication The current account has not completed real name authentication. 当前账号未完成实名认证
400 UnsupportedCompletionWindow The completionWindow of task you provided is not supported. 提供的任务completionWindow不被支持
上一篇
服务域名
下一篇
错误缓解方案