获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
- 云开发数据库访问的skip函数不能接受0作为参数
db.collection('myCollection').skip(0)调用会报错: Uncaught (in promise) Error: errCode: -401002 api parameter error | errMsg: parameter offset of function skip must be provided 这api如果这样做,太不灵活了
2018-11-23 - 云函数如何手动抛异常
- 当前 Bug 的表现(可附上截图) 云函数中抛出异常,但是小程序仍然接受到正常的返回 exports.main = async (event, context) => { throw('error') } 但是小程序调用端,仍然正常返回,result:null 。 - 预期表现 小程序端的catch中的函数被调用 - 复现路径 - 提供一个最简复现 Demo 云函数端 exports.main = async (event, context) => { throw('error') } 小程序端 wx.cloud.callFunction({ name: 'throwtest', }).then(res => { console.log('without error:', res) }).catch(err => { console.log('error:', err) })
2018-11-21