operation.getJsErrList

本接口应在服务器端调用,详细说明参见服务端API

错误查询列表

请求地址

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

请求参数

属性类型默认值必填说明
access_tokenstring接口调用凭证
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

请求示例

请在 HTTP RequestHeader 中 设置如下字段:content-type: application/json;

  1. {
  2. "startTime": "2021-01-25",
  3. "endTime": "2021-01-26",
  4. "errType": "0",
  5. "appVersion": "0",
  6. "openid": "",
  7. "keyword": "",
  8. "orderby": "uv",
  9. "desc": "2",
  10. "offset": 0,
  11. "limit": 1
  12. }

返回的 JSON 数据包

属性类型说明
errcodenumber错误码
errmsgstring错误信息
dataArray.<Object>错误列表
totalCountnumber总条数

响应示例

  1. {
  2. "success": true,
  3. "openid": "",
  4. "data": [
  5. {
  6. "errorMsgMd5": "53b4825ec4a41d966f88c298c718de80",
  7. "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",
  8. "uv": 1,
  9. "pv": 1,
  10. "errorStackMd5": "e371cd9cae821969c855f9f461327dac",
  11. "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",
  12. "pvPercent": "0.1%",
  13. "uvPercent": "1.1%"
  14. }
  15. ],
  16. "totalCount": 739,
  17. "errcode": 0
  18. }