# Code node errors on empty array passed from the linked node

**URL:** <https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144>\
**Category:** Questions\
**Created:** [March 7, 2024, 8:01am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144 "2024-03-07T08:01:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlkMarudny](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/plkmarudny/32/36609_2.png) [@PlkMarudny](https://community.n8n.io/u/PlkMarudny)\
**Post date:** [March 7, 2024, 8:01am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/1 "2024-03-07T08:01:36Z")

</div>

## 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)

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

```

But what I got is an error:

```auto
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:**  
1.29.1
- **Database:**  
SQLite
- **Running n8n via:**  
Docker
- **Operating system**  
Windows 10

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [March 7, 2024, 8:01am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/2 "2024-03-07T08:01:37Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![PlkMarudny](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/plkmarudny/32/36609_2.png) [@PlkMarudny](https://community.n8n.io/u/PlkMarudny)\
**Post date:** [March 7, 2024, 8:44am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/3 "2024-03-07T08:44:56Z")

</div>

Reformatted my question

---

<div class="post-metadata">

**Author:** ![PlkMarudny](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/plkmarudny/32/36609_2.png) [@PlkMarudny](https://community.n8n.io/u/PlkMarudny)\
**Post date:** [March 7, 2024, 10:13am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/4 "2024-03-07T10:13:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Shubha](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Shubha](https://community.n8n.io/u/Shubha)\
**Post date:** [March 8, 2024, 9:56am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/5 "2024-03-08T09:56:36Z")

</div>

Hi,  
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  
Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [March 15, 2024, 9:56am UTC](https://community.n8n.io/t/code-node-errors-on-empty-array-passed-from-the-linked-node/42144/6 "2024-03-15T09:56:45Z")

</div>

Closed on March 15, 2024, 9:56am UTC

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