# \[Resolved\] Why is this causing errors?

**URL:** <https://discourse.nodered.org/t/resolved-why-is-this-causing-errors/19488>\
**Category:** General\
**Created:** [23 December 2019 01:26 UTC](https://discourse.nodered.org/t/resolved-why-is-this-causing-errors/19488 "2019-12-23T01:26:50Z")\
**Posts on this page:** 1\
**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:** [23 December 2019 01:26 UTC](https://discourse.nodered.org/t/resolved-why-is-this-causing-errors/19488/1 "2019-12-23T01:26:50Z")

</div>

In light of recent events, I think I have found a big cause for the machine _dieing_.

Variables.

Though painfully obvious to those in the know, it isn't for me.

```auto
const device_name = global.get('myDeviceName');

node.warn(" Device name " + device_name);

const flow_name_ = flow.get("name");

node.warn("Flow name " + flow_name);

msg.topic ="ERROR_REPORT/" + device_name + "/" + flow_name;
return msg;

```

My suspicion is the `const` rather than `let`.  
As the _device\_name_ and _flow\_name_ are not going to change, after reading the _new_ stuff on how to use `let` and `const` (though it used to be `var` for the first one) why is it creating errors?

Ok, I've changed it from `const` to `let` and it is still creating errors: hand over fist.

Any elephants I'm missing?

ARGH!

The _missing_ `_` at the end of the name for `flow_name_` in the second last line!

(I'm an idiot!)  
RESOLVED!
