Skip to content

Evaluating params fails without catchable error #61

@objt-jwt

Description

@objt-jwt

I'm using Node-RED V3.0.2 and the components V0.3.5
We sometime configure an parameter that is not evaluatable, for example:
image

When executing the run component, the component throws an error which is not catchable using the "catch" node inside the flow.
An simple example flow can be found attached.
flows.json

In the console logging, we find following error.
Trace: component f790c7a2591ea7d1 TypeError: Cannot read properties of undefined (reading 'object') at /usr/src/node-red/node_modules/@node-red/util/lib/util.js:430:29 at Array.reduce (<anonymous>) at getObjectProperty (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:429:18) at getMessageProperty (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:401:12) at Object.evaluateNodeProperty (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:652:22) at sendStartFlow (/usr/src/node-red/node_modules/node-red-contrib-components/components/run-component.js:70:26) at component._inputCallback (/usr/src/node-red/node_modules/node-red-contrib-components/components/run-component.js:253:7) at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) at component.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at consoleCall (<anonymous>) at sendStartFlow (/usr/src/node-red/node_modules/node-red-contrib-components/components/run-component.js:137:15) at component._inputCallback (/usr/src/node-red/node_modules/node-red-contrib-components/components/run-component.js:253:7) at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) at component.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at component.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) at component.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:485:10) at Immediate._onImmediate (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:831:52) at processImmediate (node:internal/timers:466:21) 6 Dec 15:28:58 - [error] [component:f790c7a2591ea7d1] component

Is it possible to catch this error while executing RED.util.evaluateNodeProperty and create a catchable error instead?

Metadata

Metadata

Assignees

Labels

implementedWork is done. Waiting for release.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions