Skip to content

错误码说明(OpenAPI V2)

顶层 code(通用)

  • 0:成功
  • 400:参数错误或业务错误
  • 401:API Key 无效(鉴权失败)
  • 403:无写权限(仅写操作)
  • 404:资源不存在或无权限
  • 429:请求过于频繁(限流)
  • 502:上游服务暂不可用

业务错误 error_code(模块异常码)

当发生业务错误时,上游可能会返回 error_code。OpenAPI V2 会将该 error_code 透传到响应体顶层 error_code(同时保留顶层 codemessage)。

说明:若上游以非 2xx HTTP 状态返回错误,且错误响应体无法被解析,则可能仅表现为 404/502 等 HTTP 结果,此时响应体中未必包含 error_code

下面是模块异常码(区间 100300 ~ 100329):

error_codemessage中文说明
100300System error系统错误(未归类的内部异常)。
100301Invalid request parameters请求参数无效(必填缺失、类型错误、参数值非法)。
100302Unsupported version版本不支持(version 无法识别)。
100303Record not found记录未找到(指定 record_id / record_url 无法定位记录)。
100304Form not found表单未找到(指定 tpl_id 无法找到对应表单)。
100305Unsupported output format输出格式不支持(format 参数无法识别)。
100306Form not assigned to this code二维码未关联该表单。
100307Duplicate submission not allowed for this field不允许重复提交(唯一性校验失败)。
100308Required field is empty必填字段为空(缺少必要字段或未填写)。
100309Field validation failed字段校验失败(字段值格式或内容不合法)。
100310Submitted resource has expired提交所依赖的资源已过期。
100311User submission limit reached用户提交次数达到上限。
100312Form submission limit reached表单提交次数达到上限。
100313Submission not allowed at current time当前时间不允许提交。
100314Submission not allowed in current code state当前二维码状态不允许提交。
100315API key invalid or disabledAPI Key 无效或已禁用。
100316API key org mismatchAPI Key 对应企业与请求不匹配。
100317No codes found in the selected category指定分类下没有可用二维码。
100318Too many codes found in the selected category命中二维码过多,超出系统限制。
100319Certificate verification failed通用凭证核销失败,未命中更细的核销错误场景。
100320Invalid certificate code凭证码无效,或无法定位对应凭证记录。
100321Certificate verification is not enabled表单或凭证未开启核销能力。
100322Certificate record is not approved for verification凭证记录尚未审核通过,暂不可核销。
100323Certificate does not match the requested scope凭证与请求中 tpl_id / code_id 限制范围不匹配。
100324Certificate cannot be verified in current status当前凭证状态不允许核销,或核销流程已经结束。
100325Invalid verification action核销动作不支持(如 action_type 非法),或该表单未启用对应核销方式。
100326Invalid target certificate status目标凭证状态无效、不存在,或没有可切换的下一状态。
100327Invalid verification authorization code核销授权码无效或已过期。
100328No permission to verify this certificate当前操作方没有核销该凭证的权限。
100329Identity information required before verification核销前需要先完善身份信息。