I suspect you need to set msg.topic on your inject nodes. Otherwise you will create an endless "try-catch" loop with your catch node, because you re-inject the error message into gate.
The message 'Message exceeded maximum number of catches' indicates that the catch node has an internal fail-safe to prevent endless loops.
Anyway, with the way you wired your catch node, you can run into this situation again, as soon as any other node on this tab fails with an error. If the msg.topic is not set, gate and catch-all will play message ping-pong again.
Looking at the code of the gate node, it implicitly requires the msg.topic to be a string. The type check in line 46 needs to be improved. If msg.topic is anything other than a string or undefined, it will raise the TypeError you are seeing, because toLowerCase() is likely not present.
This is also a bug in the gate node, you should raise an issue there, too.
Yes, ok. But that was exassabated (?) by the error with how I constructed the other part of the flow.
What is annoying I wasn't told/get the flow name.
But maybe that is because of how the error happened. But the catching of them is supposed to be informative.
The error message gave you the name of the node and its id. With that information you can instantly get to the node in question whichever flow it is on.
I am only saying that in that piece of code I posted - though not seen as it isn't included - is a part that names the flow from which the error came.
I'm guessing that as the "Telemetry" flow is the main one, the error hasn't gone past that part of the flow by then.
(This was realised shortly before me posting this reply.)
So for humans to see an error and examine it, it is human readable and shows the type of error and from which flow.
Good catch. I will fix it shortly. In my defense, the assumption that msg.topic (if defined) will be a string comes from its origin in the MQTT topic, which is required to be one. Clearly, NR does not impose any such restriction. I am still a bit curious as to what @Trying_to_learn was injecting to make all this happen.
For the record, this is a general issue, not specific to the gate node. If any node downstream of a catch node throws an error, and the catch node is able to catch that error, you will end up with an infinite loop that is halted only by the fail-safe.