Error redirection

I'm using tuya-smart-device to control some bulbs. If the power switch is off the bulb is naturally off and the tuya-smart-device can't connect. That is alright I even capture the status of the node to set proper value of the bulb in another app. However... when tuya-smart-device node cannot establish a connection it generates error that is logged on debug window and since I have couple of such devices debug windows gets pretty messsy.

I'm looking for solution that would allow to keep the debug windos clean. Is there a way to redirect errors from specific node to console or a file instead of displaying in debug window?

try adding a catch node. If the tuya-smart-device node is written correctly it should send the error to the catch node (then from there you can chose to send the error to a debug node (or not))

If the catch node fails to catch the error, then you should find the repo / contact the autor / raise an issue on the tuya-smart-device project & request that node.error is called with a 2nd parameter to permit the catch node to catch errors it raises.


Thank you for your reply. I indeed tried with catch node and I could not catch the error but since it was the first time to use catch node I was not sure how it should work hence my post here. So indeed it looks like the tuya-smart-defice node does not allow to catch erros so following your advice I've just created issue at repo of the project.

Once again thank you for your reply