So to catch this "one off on reboot" I have to populate my flow with ..... 70 or so catch
nodes.
Yeah, I'll let this go to the keeper. Reward for time is too low.
Yes, the "This will throw an error" is a specific bit of code I use to test my error catching routine and for the sake of making the example easily detectable, I did name the node as shown.
Just to share and maybe help others, this is my routine (subflow in it) that I put on most/all tabs.
There are external things set which are used to identify the flow.
[{"id":"62be7566.4b4454","type":"subflow","name":"Error catch","info":"","category":"","in":[{"x":120,"y":250,"wires":[{"id":"1b99b8b4.ecf75f"}]}],"out":[{"x":1040,"y":280,"wires":[{"id":"a142130.032a0f","port":0}]},{"x":1040,"y":330,"wires":[{"id":"f632883f.7b7a28","port":0}]}],"env":[],"color":"#DD0000","outputLabels":["Error output","Overspeed alarm"],"icon":"node-red/alert.svg","status":{"x":1040,"y":390,"wires":[{"id":"101bf1bb.1f7d56","port":0}]}},{"id":"ab7353b2.d1b098","type":"msg-speed","z":"62be7566.4b4454","name":"Speed check","frequency":"sec","estimation":false,"ignore":false,"x":450,"y":330,"wires":[["c7fad2ac.ec77e"],[]]},{"id":"c7fad2ac.ec77e","type":"switch","z":"62be7566.4b4454","name":"> max_speed?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"max_speed","vt":"global"}],"checkall":"true","repair":false,"outputs":1,"x":620,"y":330,"wires":[["f632883f.7b7a28"]]},{"id":"f632883f.7b7a28","type":"change","z":"62be7566.4b4454","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"CONTROL","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":330,"wires":[["a142130.032a0f","101bf1bb.1f7d56"]]},{"id":"a142130.032a0f","type":"gate","z":"62be7566.4b4454","name":"","controlTopic":"control","defaultState":"open","openCmd":"go","closeCmd":"stop","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":920,"y":280,"wires":[[]]},{"id":"45c23f97.247a68","type":"change","z":"62be7566.4b4454","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"error","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":280,"wires":[["d9bab478.78eb8"]]},{"id":"1b99b8b4.ecf75f","type":"switch","z":"62be7566.4b4454","name":"RESET?","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"RESET","vt":"str"},{"t":"neq","v":"RESET","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":240,"y":250,"wires":[["7eb12133.460c6"],["ab7353b2.d1b098","30576976.5a4d76"]]},{"id":"7eb12133.460c6","type":"change","z":"62be7566.4b4454","name":"Go","rules":[{"t":"set","p":"payload","pt":"msg","to":"go","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"CONTROL","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":190,"wires":[["a142130.032a0f","101bf1bb.1f7d56"]]},{"id":"101bf1bb.1f7d56","type":"function","z":"62be7566.4b4454","name":"","func":"if (msg.payload == \"stop\")\n{\n msg.payload = ({fill: \"red\",text:\"Overspeed\"});\n}\nif (msg.payload == \"go\")\n{\n msg.payload = ({fill: \"green\",text:\"Good\"});\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":930,"y":390,"wires":[[]]},{"id":"dc4e7681.85bec8","type":"moment","z":"62be7566.4b4454","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Australia/Sydney","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYY-MM-DD HH:mm:ss","locale":"en_AU","output":"payload","outputType":"msg","outTz":"Australia/Sydney","x":745,"y":230,"wires":[["b6239445.5a3bb"]],"l":false},{"id":"b6239445.5a3bb","type":"change","z":"62be7566.4b4454","name":"Time","rules":[{"t":"move","p":"payload","pt":"msg","to":"time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":230,"wires":[["b8ab3ac7.6b4788"]]},{"id":"30576976.5a4d76","type":"change","z":"62be7566.4b4454","name":"Save","rules":[{"t":"set","p":"payload","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":230,"wires":[["372932c7.1c595e"]]},{"id":"b8ab3ac7.6b4788","type":"change","z":"62be7566.4b4454","name":"Get","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":280,"wires":[["45c23f97.247a68"]]},{"id":"372932c7.1c595e","type":"change","z":"62be7566.4b4454","name":"TimeStamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":230,"wires":[["dc4e7681.85bec8"]]},{"id":"d9bab478.78eb8","type":"function","z":"62be7566.4b4454","name":"Get name/s","func":"//var flow_name = flow.get(\"$parent.name\");\n//return msg;\n\nvar device_name =global.get('myDeviceName');\nvar flow_name = flow.get(\"$parent.name\");\nmsg.topic =\"ERROR_REPORT/\" + device_name + \"/\" + flow_name;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":745,"y":280,"wires":[["a142130.032a0f"]],"l":false},{"id":"aa78ace9.fb58","type":"inject","z":"aa48e352.9ad2f8","name":"Reset","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"RESET","payload":"","payloadType":"date","x":3710,"y":230,"wires":[["a5b8b147.602cd"]]},{"id":"a5b8b147.602cd","type":"subflow:62be7566.4b4454","z":"aa48e352.9ad2f8","name":"","x":3910,"y":200,"wires":[["c8e77e13.fe80b","5a4619d.343b0e8"],["786991bf.44a08"]]},{"id":"786991bf.44a08","type":"link out","z":"aa48e352.9ad2f8","name":"Runaway","links":["8da8c919.68c64","71f2396c.bae758","790c18ae.de419"],"x":4090,"y":230,"wires":[],"l":true},{"id":"1d24f9c6.5e269e","type":"catch","z":"aa48e352.9ad2f8","name":"","scope":null,"x":3700,"y":180,"wires":[["a5b8b147.602cd"]]},{"id":"2959e713.3ff1a8","type":"inject","z":"aa48e352.9ad2f8","name":"RESET","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"CONTROL","payload":"reset","payloadType":"str","x":3890,"y":310,"wires":[["5a4619d.343b0e8"]],"icon":"font-awesome/fa-eject"},{"id":"b9166288.3410d8","type":"inject","z":"aa48e352.9ad2f8","name":"Next","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"CONTROL","payload":"trigger","payloadType":"str","x":3890,"y":270,"wires":[["5a4619d.343b0e8"]],"icon":"node-red/trigger.svg"},{"id":"5a4619d.343b0e8","type":"q-gate","z":"aa48e352.9ad2f8","name":"qgate","controlTopic":"CONTROL","defaultState":"queueing","openCmd":"Go","closeCmd":"Stop","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","peekCmd":"","dropCmd":"","statusCmd":"","maxQueueLength":"50","keepNewest":true,"qToggle":false,"persist":false,"x":4080,"y":270,"wires":[["e552f4d2.7ddcb"]]},{"id":"e552f4d2.7ddcb","type":"debug","z":"aa48e352.9ad2f8","name":"Machine health error list","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":4290,"y":270,"wires":[]}]