问答详情
源自:3-3 云函数

在执行云数据库批量操作时报错 请问老师是什么原因呢?

Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID a501e405-cbd7-11ea-974f-5254003f7a63, cloud function service error code -504002, error message user’s issue failed:kLoadFuncFailed; at cloud.callFunction api; 

    at new u (VM15 WAService.js:2)

    at d (VM15 WAService.js:2)

    at f (VM15 WAService.js:2)

    at Function.success (VM15 WAService.js:2)

    at h (VM15 WAService.js:2)

    at VM15 WAService.js:2

    at k (VM15 WAService.js:2)

    at Function.<anonymous> (VM15 WAService.js:2)

    at h (VM15 WAService.js:2)

    at VM15 WAService.js:2


提问者:慕沐3057435 2020-07-22 12:59

个回答

  • 谢成
    2020-07-24 00:17:56

    从错误码看是云函数执行失败。

    1、在云函数端设置云环境id:

    cloud.init({
      env: cloud.DYNAMIC_CURRENT_ENV
    })

    2、请仔细对比课程中的代码,看下哪里和课程代码不一样,是不是哪里马虎敲错了