- openapi.security.imgSecCheck返回41005错误?
从小程序云函数调用imgSecCheck()时一直报41005错误,但是对应的media已经按文档设置。 errCode: 41005 | errMsg: openapi.security.imgSecCheck:fail media data missing hint: [xKvxiA04673955] 错误信息提示 imgSecCheck() is triggered from cloud with event: {action: "imgSecCheck", contentType: "image/jpg", buffer: {…}} action: "imgSecCheck" buffer: {type: "Buffer", data: Array(15006)} contentType: "image/jpg" __proto__: Object exception during imgSecCheck, e: Error: errCode: 41005 | errMsg: openapi.security.imgSecCheck:fail media data missing hint: [xKvxiA04673955] at callWXOpenAPI (/.../cloudfunctions/openapi/node_modules/wx-server-sdk/index.js:2267:31) at processTicksAndRejections (internal/process/task_queues.js:85:5) at async imgSecCheck (/.../cloudfunctions/openapi/index.js:43:15) 小程序云开发服务端代码段 // 图片内容检测 async function imgSecCheck(event) { console.debug('imgSecCheck() is triggered from cloud with event: ', event) try { let res = await cloud.openapi.security.imgSecCheck({ media: { contentType: event.contentType, // 'image/png', value: event.value, // Buffer } }) return res } catch (e) { console.error('exception during imgSecCheck, e: ', e) return e } }
2020-02-26 - 如何解决数据库事务API提示CloudSDKError的错误?
在使用调用数据库事务API时,一直返回SDKError. 测试代码 [图片] 错误信息 index.js:37 transaction error CloudSDKError: errCode: -1 unknown error | errMsg: collection.add:fail Error: 400 Bad Request ; at collection.add api; at returnAsCloudSDKError (C:\...\node_modules\wx-server-sdk\index.js:6057:16) at Object.returnAsFinalCloudSDKError (C:\...\node_modules\wx-server-sdk\index.js:6071:15) at Promise (C:\...\node_modules\wx-server-sdk\index.js:1201:32) at processTicksAndRejections (internal/process/task_queues.js:86:5)
2019-12-26