Hi Team.
I'm using this method:
https://developer.domo.com/portal/bb75ce8b1c00f-code-engine-api#run-function
With the below details from postman (replaced inputs{} for this question)
```
POST https://{company}.domo.com/api/codeengine/v2/packages/{package_id_found_in_url}/versions/{version_integers}/functions/sendEmail
Authorization: Token (generated via Admin > Access Tokens)
body (JSON)
{
"inputVariables": {
"subject": "This is a test",
"text": "Hi there - I'm checking this lands in the body of the email",
"recipientsUserIds": [integer]
},
"settings": { "getLogs": false
}
I'm getting the following error:
{
"executionId": "",
"packageId": "this matches the input - redacted for the question",
"version": "matches input",
"functionName": "sendEmail",
"status": "FAILED",
"settings": {
"getLogs": false
},
"startedOn": "2025-02-26T20:29:32.665Z",
"startedBy": "user_id matched",
"completedOn": "2025-02-26T20:29:33Z",
"result": null,
"stdout": null,
"stderr": {
"log": [
"TypeError: Cannot read properties of null (reading 'length')\n at sendEmail (/var/task/function.js:63:45)\n at execute (/var/task/executor.js:47:44)\n at Object.<anonymous> (/var/task/executor.js:77:1)\n at Module._compile (node:internal/modules/cjs/loader:1469:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)\n at Module.load (node:internal/modules/cjs/loader:1288:32)\n at Module._load (node:internal/modules/cjs/loader:1104:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"
]
},
"errorInformation": null
}
Please can someone advise (it's a response status of 200 so blackbox from there for me.