Cannot read properties of undefined (reading 'error') In Level 2 course. Discord Node

I am having a similar problem with “Part 3: Generating files for total sales”. The Convert to File node outputs a binary object with no fields, so if I implement it as in the course description I get the same error: “Cannot read properties of undefined (reading ‘error’)”

I tried copying the code at the end of this URL Workflow 2 | n8n Docs and I verified that it produces the error.

I’m not 100% sure but this seems to be related: Issue with Convert to File and Code Nodes Returning Empty Binary Output in n8n 1.81.4 + Workflow Goal Explanation - #2 by lugnicca