Open ozett opened 4 years ago
You can check the message directly: if (msg == "Connection closed!") { ... }
👍 will see if i can set up some sort of watchdog.. thx.
do you think that this will work within a node?
not really...
can the "connection closed" get into a >>more<< node-red-stylish property for use in a switch-node?
i will try it with jsonata meanwhile...
You need to set the output of the error node to "Complete message object" and not "msg.payload".
yeah, but most nodes want msg.payload, or i have to use change-node to move properties. but that will work at the moment also, of course. to have it in payload would make chaining some nodes a bit easyier. ..
Try msg.error
.
See: https://cookbook.nodered.org/basic/trigger-on-error#example
I don't think there is a way to set msg.payload
. Which node requires msg.payload
? Normally you can set the object namespace yourself.
i always make the mistake, that the inject-node injects only into msg.payload. a change-node has to follow to move it..
i try to avoid function-node and at firstplace use only the basic-nodes. but that way i have to use too much change-nodes to transfer properties from/in outside of .payload.
but a good hint with the catch-node, as i believe, one could filter on catching only certain node.. i will try this, too.
hi, is it possible to filter/catch the "connection closed" message in a flow? i am asking, because i cannot see that the message is within msg.payload as an property (2).
how do i catch this within node-red?
maybe there is room for improvement to send as a msg.property?