lfanewL
Windmillโ€ข2y agoโ€ข
9 replies
lfanew

Some parts of flow fails when parent_job is set

I'm currently dealing with an issue where a flow run will fail if the parent_job is set. If I don't pass a parent_job then the flow runs just fine.

Why might this be happening? Is this expected?

Here's a snippet of the step and the result. It seems like the items, which are set to the result of a previous step, are null (which they shouldn't be as the step returned results, see image below).

const items = results.b
let titles = []

items.forEach(function(e) {
    titles.push(`"[${e.title}](${e.link})`)
});
let result = 
`List these titles & links in Markdown. Make sure they are hyperlinked.
Add an emoji at the end of each one that matches the title as best as possible.
See an EXAMPLE for how to format.
---
EXAMPLE:
1. [Example 1](https://example1.com) ๐Ÿ‘จโ€๐Ÿ’ป
2. [Example 2](https://example2.com) ๐Ÿ•ฐ๏ธ
...
...
---
INPUT:
${titles.join("\n")}`
return result;


{
    "error": {
        "name": "InternalErr",
        "message": "Error during isolated evaluation of expression `const items = results.b\r\nlet titles = []\r\n\r\nitems.forEach(function(e) {\r\n    titles.push(`\"[${e.title}](${e.link})`)\r\n});\r\nlet result = \r\n`List these titles & links in Markdown. Make sure they are hyperlinked.\r\nAdd an emoji at the end of each one that matches the title as best as possible.\r\nSee an EXAMPLE for how to format.\r\n---\r\nEXAMPLE:\r\n1. [Example 1](https://example1.com) :man_technologist:\r\n2. [Example 2](https://example2.com) :clock:\r\n...\r\n...\r\n---\r\nINPUT:\r\n${titles.join(\"\\n\")}`\r\nreturn result;`:\nTypeError: Cannot read properties of null (reading 'forEach')\n    at <anon>:48:7\n    at eventLoopTick (ext:core/01_core.js:153:7)"
    }
}
Screenshot20from202024-04-082019-42-01.png
Was this page helpful?