Open oazabir opened 6 years ago
Have the same issue with an easy SQL Statement:
Error: NJS-006: invalid type for parameter 2
at Object.assert (/home/admin/.node-red/node_modules/oracledb/lib/util.js:159:11)
at Connection.execute (/home/admin/.node-red/node_modules/oracledb/lib/connection.js:145:16)
at Connection.execute (/home/admin/.node-red/node_modules/oracledb/lib/util.js:178:19)
at OracleServer.node.query (/home/admin/.node-red/node_modules/node-red-contrib-oracledb-mod/lib/oracledb.js:305:33)
at OracleServer.node.queryQueued (/home/admin/.node-red/node_modules/node-red-contrib-oracledb-mod/lib/oracledb.js:383:22)
at /home/admin/.node-red/node_modules/node-red-contrib-oracledb-mod/lib/oracledb.js:173:30
at /home/admin/.node-red/node_modules/oracledb/lib/oracledb.js:255:7
Hi all, the issue cames from an invalid bind parameter handling at line 83 in oracledb.js. There should be a check of typeof object or array like this:
if (typeof msg.payload === 'object' || typeof msg.payload === 'array') { values = msg.payload; }
Node-red crashes with this error. May be it needs some try...catch around this code: