# Debug Node failing to report null as part of the node status

**URL:** <https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720>\
**Category:** General\
**Created:** [18 January 2025 20:30 UTC](https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720 "2025-01-18T20:30:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [18 January 2025 20:30 UTC](https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720/1 "2025-01-18T20:30:54Z")

</div>

If` null` is sent to a `debug node` with the node status check box checked an error message occurs, `"TypeError: Cannot convert undefined or null to object"`

This occurred with a node that has null as an output but can be checked with this flow

```auto
[{"id":"384f86827ddc8951","type":"inject","z":"253e042c05439381","name":"Send Null","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"null","payloadType":"json","x":1080,"y":580,"wires":[["938a69049238c1da"]]},{"id":"938a69049238c1da","type":"debug","z":"253e042c05439381","name":"Report Null","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1330,"y":580,"wires":[]}]

```

I am not sure if this is a bug or a restriction on the way that the node status is reported

---

<div class="post-metadata">

**Author:** ![ziga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ziga/32/98138_2.png) [@ziga](https://discourse.nodered.org/u/ziga)\
**Post date:** [18 January 2025 23:58 UTC](https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720/2 "2025-01-18T23:58:17Z")

</div>

As you're outputting JSON and null is a valid JSON, I'd say it's a bug.

Code fails at this line [here](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/nodes/core/common/21-debug.js#L151) in debug node.

`hasOwnProperty.call(output, "fill")` is essentially calling `hasOwnProperty.call(null, "fill")` that fails with above error.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 January 2025 11:01 UTC](https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720/3 "2025-01-19T11:01:10Z")

</div>

Thanks for pointing us in the right direction - fix PR raised here - [fix debug status reporting if null by dceejay · Pull Request #5018 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/5018)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 February 2025 11:01 UTC](https://discourse.nodered.org/t/debug-node-failing-to-report-null-as-part-of-the-node-status/94720/4 "2025-02-02T11:01:50Z")

</div>

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