# Bug report on errors shown in node?

**URL:** <https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833>\
**Category:** General\
**Created:** [21 August 2020 12:54 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833 "2020-08-21T12:54:23Z")\
**Posts on this page:** 7\
**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:** [21 August 2020 12:54 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/1 "2020-08-21T12:54:23Z")

</div>

I am not having luck with writing code in a `function` node. (My fault/problem)

But what is happening seems strange.

If I am on the line, there is no error shown.  
But if I move to another line, the line which I was on then shows an error:

See:

(No error visible)

 ![Screenshot from 2020-08-21 22-50-55](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfcf15aa3d5d24acdc4e1ff5520063378e1b2f36.png)

I move to another line and......

 ![Screenshot from 2020-08-21 22-50-59](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e4938d97102af32a78bb7503843a9337b5bbcd7.png)

Machine details:

```auto
Raspberry Pi Zero W Rev 1.1

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Raspberry Pi reference 2017-09-07
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 496e41575eeb9fa13f394ffb407b7bc1d00b21c2, stage5
Linux TelePi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux

```

NR 1.0.3

```auto
pi@TelePi:~/.node-red $ node -v
v10.17.0

```

Sorry, anything else missing?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 August 2020 13:07 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/2 "2020-08-21T13:07:41Z")

</div>

It doesn't always show an error while you are still on the line. Is that a problem?

---

<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:** [21 August 2020 13:13 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/3 "2020-08-21T13:13:28Z")

</div>

Well,

If you are the local _village idiot_ and type a line which is wrong and it doesn't show an error, I press the `OK` button and then I see an error for the node.

I open it and it says the line has an error.

I guess - now - you are right. (Of course you are.) It just threw me many times when I was working on that error we are discussing in the other thread.

I would type what I thought was correct and without thinking to move to another line, clicked the `OK` button and the node then told me there was an error.

I guess I need to move off the last line entered before pressing the `OK` button in future.

Sorry. Yeah. How it does it makes sense now - in retrospect.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 August 2020 13:15 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/4 "2020-08-21T13:15:44Z")

</div>

It may be difficult for the interpreter to know that there is an error till you have finished typing. If it continually did it as you were typing it might be off-putting and also might take a lot of processor to continually re-evaluate it.

---

<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:** [21 August 2020 13:17 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/5 "2020-08-21T13:17:45Z")

</div>

Yes, and in retrospect I totally agree.

As usual: I spoke before I thought.  
(Well, maybe 90% of the time.) 😉

---

<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:** [21 August 2020 13:37 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/6 "2020-08-21T13:37:36Z")

</div>

A thought......

Fanciful as it is:

Granted while typing on a line you don't want error messages for that line.

But.....

If there is an error when you click the `OK` button, you are prompted THERE that there is an error and not after the edit screen has closed and you see the red triangle on the node and have to re-open it.

Just a thought.  
Disabling the `OK` button - which I thought of - would not be good, as if you don't care and simply need to get out of editing that node _for now_..... It would be annoying.

---

<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:** [4 September 2020 13:37 UTC](https://discourse.nodered.org/t/bug-report-on-errors-shown-in-node/31833/7 "2020-09-04T13:37:40Z")

</div>

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