# 查询错误列表

调试诊断

接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南

接口英文名:getJsErrList

本接口用于查询错误列表

# 1. 调用方式

# HTTPS 调用

POST https://api.weixin.qq.com/wxaapi/log/jserr_list?access_token=ACCESS_TOKEN

支持加密请求: 本接口支持服务通信二次加密和签名,可有效防止数据篡改与泄露。查看详情

# 云调用

  • 本接口不支持云调用

# 第三方调用

  • 本接口支持第三方平台代商家调用。

  • 该接口所属的权限集 id 为:18

  • 服务商获得其中之一权限集授权后,可通过使用 authorizer_access_token 代商家进行调用,具体可查看 第三方调用 说明文档。

# 2. 请求参数

# 查询参数 Query String parameters

参数名类型必填说明
access_tokenstring接口调用凭证,可使用 access_tokenauthorizer_access_token

# 请求体 Request Payload

参数名类型必填说明
appVersionstring小程序版本 "0"代表全部, 例如:“2.0.18”
errTypestring错误类型 "0"【全部】,"1"【业务代码错误】,"2"【插件错误】,"3"【系统框架错误】
startTimestring开始时间, 格式 "xxxx-xx-xx"
endTimestring结束时间,格式 “xxxx-xx-xx”
keywordstring从错误中搜索关键词,关键词过滤
openidstring发生错误的用户 openId
orderbystring排序字段 "uv", "pv" 二选一
descstring排序规则 "1" orderby字段降序,"2" orderby字段升序
offsetnumber分页起始值
limitnumber一次拉取最大值, 最大 30

# 3. 返回参数

# 返回体 Response Payload

参数名类型说明
errcodenumber错误码
errmsgstring错误信息
dataobjarray错误列表
totalCountnumber总条数

# Res.data(Array) Object Payload

错误列表

参数名类型说明
errorMsgMd5stringerrorMsgMd5
errorMsgstringerrorMsg
uvnumberuv
pvnumberpv
errorStackMd5stringerrorStackMd5
errorStackstringerrorStack
pvPercentstringpvPercent
uvPercentstringuvPercent

# 4. 注意事项

本接口无特殊注意事项

# 5. 代码示例

请求示例

{
  "startTime": "2021-01-25",
  "endTime": "2021-01-26",
  "errType": "0",
  "appVersion": "0",
  "openid": "",
  "keyword": "",
  "orderby": "uv",
  "desc": "2",
  "offset": 0,
  "limit": 1
}

返回示例

{
  "success": true,
  "openid": "",
  "data": [
    {
      "errorMsgMd5": "53b4825ec4a41d966f88c298c718de80",
      "errorMsg": "errCode: -404012 polling exceed max timeout retry | errMsg: cloud.callFunction:fail polling exceed max timeout retry (callId: 1611553677669-0.2531087324274228) (trace: 13:47:57 start->13:48:12 timeout, retry->13:48:18 app hide->13:48:27 timeout, retry->13:48:42 timeout, abort); at cloud.callFunction api; \nError: errCode: -404012 polling exceed max timeout retry | errMsg: cloud.callFunction:fail polling exceed max timeout retry (callId: 1611553677669-0.2531087324274228) (trace: 13:47:57 start->13:48:12 timeout, retry->13:48:18 app hide->13:48:27 timeout, retry->13:48:42 timeout, abort); at cloud.callFunction api; \n    at new t (https://usr/app-service.js:2:320930)\n    at c (https://usr/app-service.js:2:321660)\n    at l (https://usr/app-service.js:2:321755)\n    at https://usr/app-service.js:2:297192\n    at https://usr/app-service.js:2:76398\n    at Object.next (https://usr/app-service.js:2:76503)\n    at s (https://usr/app-service.js:2:75234)\n",
      "uv": 1,
      "pv": 1,
      "errorStackMd5": "e371cd9cae821969c855f9f461327dac",
      "errorStack": "errCode: -404012 polling exceed max timeout retry | errMsg: cloud.callFunction:fail polling exceed max timeout retry (callId: 1611553677669-0.2531087324274228) (trace: 13:47:57 start->13:48:12 timeout, retry->13:48:18 app hide->13:48:27 timeout, retry->13:48:42 timeout, abort); at cloud.callFunction api; \nError: errCode: -404012 polling exceed max timeout retry | errMsg: cloud.callFunction:fail polling exceed max timeout retry (callId: 1611553677669-0.2531087324274228) (trace: 13:47:57 start->13:48:12 timeout, retry->13:48:18 app hide->13:48:27 timeout, retry->13:48:42 timeout, abort); at cloud.callFunction api; \n    at new t (https://usr/app-service.js:2:320930)\n    at c (https://usr/app-service.js:2:321660)\n    at l (https://usr/app-service.js:2:321755)\n    at https://usr/app-service.js:2:297192\n    at https://usr/app-service.js:2:76398\n    at Object.next (https://usr/app-service.js:2:76503)\n    at s (https://usr/app-service.js:2:75234)\n",
      "pvPercent": "0.1%",
      "uvPercent": "1.1%"
    }
  ],
  "totalCount": 739,
  "errcode": 0
}

# 6. 错误码

以下是本接口的错误码列表,其他错误码可参考 通用错误码;调用接口遇到报错,可使用官方提供的 API 诊断工具 辅助定位和分析问题。

错误码错误描述解决方案
-1system error系统繁忙,此时请开发者稍候再试
20011频率限制请稍后再试
40001invalid credential  access_token isinvalid or not latest获取 access_token 时 AppSecret 错误,或者 access_token 无效。请开发者认真比对 AppSecret 的正确性,或查看是否正在为恰当的公众号调用接口

# 7. 适用范围

本接口在不同账号类型下的可调用情况:
小程序小游戏
  • ✔:该账号可调用此接口
  • 其他未明确声明的账号类型,如无特殊说明,均不可调用此接口;