Can't receive error from node Node-red-contrib-mssql-plus

In Node-Red V1.0.6 Node.js V12.16.3
I update Node-red-contrib-mssql to Node-red-contrib-mssql-plus(V 0.4.3) by use nmp uninstall.
It can connect and receive data from SQL correctly. But when error occur node status stuck at requesting even though console log return error done.


image
How to fix it.

Thank you very much, and sorry for my poor language

I think the problem is you don't have anything connected to the catch all node.

Try putting a debug node on it and see what happens.

If you see the error in that node (the debug node) I hope you can work it out from there.
Because it is now beyond my level of skills.

1 Like

Ignore the status for now (I will fix that), node status only updated when it's executed.

  1. Set the MSSQL node to throw errors (option at bottom of its settings)
  2. attach a debug node (set to show complete message) to the catch node
  3. Put a debug node just before MSSQL, set to show complete message
  4. Run the flow & show us the debug output (expand every property please)

sorry for my slow respond.
image
It's not send anything too.

sorry for my slow respond.


It's don't send anything when error.

If it's run successes debug show

How is the MSSQL triggered - every second? There is a default 15s timeout - does error not occur after 15secs?

Can you share your flow and sample query so I can debug?

In old program i test by manual trigger.

This is new flow test program that still got same problem.

[{"id":"21b89937.b02616","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e0812b3c.3ae198","type":"inject","z":"21b89937.b02616","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":220,"wires":[["bbefc0de.1e253"]]},{"id":"63fd87f.6c2a878","type":"MSSQL","z":"21b89937.b02616","mssqlCN":"bec4be8.58d5d4","name":"","query":"","outField":"payload","returnType":0,"throwErrors":1,"x":660,"y":220,"wires":[["2e13a543.0b9daa"]]},{"id":"bbefc0de.1e253","type":"function","z":"21b89937.b02616","name":"Right Query","func":"msg.payload = \"select * from Test_Delete_SQL\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":220,"wires":[["63fd87f.6c2a878"]]},{"id":"2e13a543.0b9daa","type":"debug","z":"21b89937.b02616","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":860,"y":220,"wires":[]},{"id":"6863912f.159f7","type":"function","z":"21b89937.b02616","name":"Error Query","func":"msg.payload = \"select * from Test_Delete_SQLa\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":300,"wires":[["6b545c38.b1b7e4"]]},{"id":"6aa4b03f.07efe","type":"inject","z":"21b89937.b02616","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":300,"wires":[["6863912f.159f7"]]},{"id":"6b545c38.b1b7e4","type":"MSSQL","z":"21b89937.b02616","mssqlCN":"bec4be8.58d5d4","name":"","query":"","outField":"payload","returnType":0,"throwErrors":1,"x":660,"y":300,"wires":[["1d9a1239.b8639e","ec964519.29faa8","7e9addf2.0e84e4"]]},{"id":"1d9a1239.b8639e","type":"debug","z":"21b89937.b02616","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":860,"y":300,"wires":[]},{"id":"ec964519.29faa8","type":"debug","z":"21b89937.b02616","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"error","targetType":"msg","x":860,"y":360,"wires":[]},{"id":"7e9addf2.0e84e4","type":"debug","z":"21b89937.b02616","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":420,"wires":[]},{"id":"828ade27.de485","type":"debug","z":"21b89937.b02616","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":500,"wires":[]},{"id":"40a3a135.84394","type":"catch","z":"21b89937.b02616","name":"","scope":null,"uncaught":false,"x":680,"y":500,"wires":[["828ade27.de485"]]},{"id":"bec4be8.58d5d4","type":"MSSQL-CN","z":"","tdsVersion":"7_3_B","name":"test","server":"127.0.0.1","port":"1433","encyption":false,"database":"test","useUTC":true,"connectTimeout":"15000","requestTimeout":"15000","cancelTimeout":"5000","pool":"5","parseJSON":false}]


Node setting

window 10 Pro 64bit Node-Red V1.0.6 Node.js V12.16.3

Thank you very much

I'll take a look - thanks.

PS, I edited your post to better format the code like this...

```
code here
```

Hi, you are correct - I have found a bug that crept in 17 days ago.

I have fixed it locally & this is what you should get...

I'll update the repo and NPM in a few minutes - then let you know.

@R-sa - node is now updated to v0.4.4 with fix included

Please test and feedback.

1 Like

When update node to v0.4.4 now error can send through msg.error and throw error option.


Thank you very much for guide format code and update node.
It's a very useful node.

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