# \`flow\` object undefined when calling 'handleStatus'

**URL:** <https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885>\
**Category:** General\
**Created:** [28 February 2023 19:23 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885 "2023-02-28T19:23:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackcarey](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jackcarey/32/61101_2.png) [@jackcarey](https://discourse.nodered.org/u/jackcarey)\
**Post date:** [28 February 2023 19:23 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885/1 "2023-02-28T19:23:35Z")

</div>

Hello, I'm having trouble with some custom nodes. I've installed a few that used to work after noticing the error with a new one, but the issue persists and it seems to be upstream with some of my dependencies. When I start my server with `node index.js` I receive this error against custom node instances:

```auto
TypeError: Cannot read properties of undefined (reading 'handleStatus')

```

I've tried wrapping invocations of the `handleStatus` function in try/catches to find out which one is being triggered, but no additional errors are logged to the console.

This method is part of the `flow` object upstream and the error occurs on loading the server and during deploy - so, when the flow is updated. I'm not sure how I can trace the error further. Is anyone able to help me out? Thank you

---

<div class="post-metadata">

**Author:** ![jackcarey](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jackcarey/32/61101_2.png) [@jackcarey](https://discourse.nodered.org/u/jackcarey)\
**Post date:** [9 March 2023 17:27 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885/2 "2023-03-09T17:27:33Z")

</div>

@knolleary I don't suppose you know how I can begin to debug this?

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [9 March 2023 17:39 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885/3 "2023-03-09T17:39:46Z")

</div>

> [@jackcarey](#):
>
> When I start my server with `node index.js`

This command does not start `node-red`.  
Could you please post the messages `node-red` debugs to the console when it starts, e.g. after a `node-red-start`. There should be a stacktrace giving some hints...

---

<div class="post-metadata">

**Author:** ![jackcarey](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jackcarey/32/61101_2.png) [@jackcarey](https://discourse.nodered.org/u/jackcarey)\
**Post date:** [12 March 2023 17:19 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885/4 "2023-03-12T17:19:51Z")

</div>

Apologies, I should've said that I've embedded `node-red` into an an express app following the instructions: [Embedding into an existing app : Node-RED](https://nodered.org/docs/user-guide/runtime/embedding). I'll update this message shortly with the logs

---

<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:** [11 May 2023 17:20 UTC](https://discourse.nodered.org/t/flow-object-undefined-when-calling-handlestatus/75885/5 "2023-05-11T17:20:44Z")

</div>

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