# Could someone help me with this error?

**URL:** <https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336>\
**Category:** General\
**Created:** [20 March 2020 02:10 UTC](https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336 "2020-03-20T02:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 March 2020 02:10 UTC](https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336/1 "2020-03-20T02:10:30Z")

</div>

More to the point:  
Which _node_?

Normally errors are caught and I get a message telling me which node, etc.

This doesn't have any of the usual stuff like that.

```auto
{"message":"TypeError: Cannot read property 'split' of undefined","source":{"id":"3211755c.fcfaf2","type":"string","name":"- to /","count":1},"stack":"TypeError: Cannot read property 'split' of undefined\n at S.replaceAll (/home/pi/.node-red/node_modules/string/lib/string.js:374:22)\n at executeFunctionByName (/home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:49:38)\n at /home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:72:29\n at Array.forEach (<anonymous>)\n at string._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-string/string/string.js:56:30)\n at string.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:199:18)\n at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:179:33)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)"} ERR...

```

I shall look, but as a Plan B, help may be needed/appreciated.

Ok, found the _originating node_, buy why is it in this format and not the usual format?  
(Source node: `3211755c.fcfaf2`)

like:

```auto
{"message":"ReferenceError: a is not defined (line 1, col 19)","source":{"id":"8e325c36.e50958","type":"function","name":"This will throw an error","count":1}}

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 March 2020 08:28 UTC](https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336/2 "2020-03-20T08:28:05Z")

</div>

Hi @Trying_to_learn

where are you copying that JSON from exactly?

I'm struggling to see the difference between the two examples. They both have a `source` property that gives you the node's id, name and type. In the first example that "doesn't have any of the usual stuff", it has all the usual stuff:

```auto
"source": {"id":"3211755c.fcfaf2","type":"string","name":"- to /","count":1}

```

In the second example:

```auto
"source":{"id":"8e325c36.e50958","type":"function","name":"This will throw an error","count":1}

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 March 2020 11:14 UTC](https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336/4 "2020-03-20T11:14:39Z")

</div>

I won't say my usual "sorry" here, as I am trying to break the habit.

Today (earlier) I turned on this machine and logged into my RasPi's Node-Red page.

I was shown an _error_ had occurred so I looked at my error page.  
Yes, not the best designed page, so I then went to the edit window instead.

The _message_ I posted was displayed in the `debug` window - right side of the screen as just _plain text_.

Usually when an error happens I see the structure in the `debug` window (example now)

![Screenshot from 2020-03-20 22-09-24](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bcf10245d4aa22bc3299d85afc5e4d1c1586e5d3.png)

What I saw was the entire column full of text - top to bottom of screen.  
No _structure_ at all.

No screen shot. Silly me.

I have an error catching flow for each flow and so I invoked it. Got the same output.  
No structure.

Yet, the example I just posted is how they usually appear.

The problem - after I found the `source` id - was tracked to a `switch` node which was doing (or trying to do) something to a message's property that didn't exist.  
I had been on a _quest_ getting rid of older/bad/poorer code for dates/time stamps and replacing them with my new sub-flow timestamp node.

Knowing the problem I could put the node back to how it was and try to force the error to happen again if you want, but I don't want to waste your time.

It was just I didn't get why the structure was missing from the error.

Do you want me to invoke the error again and show the screen shot?

---

<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:** [19 May 2020 11:14 UTC](https://discourse.nodered.org/t/could-someone-help-me-with-this-error/23336/5 "2020-05-19T11:14:47Z")

</div>

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