Code node errors on empty array passed from the linked node

Outputting data to console via code node does not work

I send an http request to Amazon S3 (listing the bucket), The ‘http’ node returns an empty array, as tested inside http node. That’s fine. In the code node, I just want to see the output of the linked ‘http’ node, so I use (I guess, because it is not clear from docs)

return $input.all(); // hope this is how to pass not transformed data further?

But what I got is an error:

A 'json' property isn't an object [item 0]

An empty array is a valid Json… So what is the way to simply print the input of the code node?

Please share your workflow

(exact url stripped for security)

Share the output returned by the last node

No output - errored

Information on your n8n setup

  • n8n version:
  • Database:
  • Running n8n via:
  • Operating system
    Windows 10

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Reformatted my question

It turned out the resposne type from http node should be set to ‘auto’. And it worked.

1 Like

I am currentlyfacing same issue, can you please share to me where did you make the changes of moving the response as auto in http node

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.