I'm currently writing a node that has to emit an error under certain circumstances (not as part of handling an input message). For this I'm using the node.error() function passing in an error message and as second argument an object with details of the error. I observed that catching the error with a catch node didn't work, the error was always only logged to the debug sidebar and the console. Then I realized that this happens only during early node start, i.e. when the flow is still being deployed, because when I delayed calling the error() function by e.g. 2s, catching the error with the catch node worked. I assume that the problem happens because at the time I emit the error (without delay), the flow is not completely deployed and the catch node is possibly not yet started.
So my question is: is there a possibility that a node is informed when the flow is completely deployed in order to know when the error() function can be called? I don't want to utilize above described delay, this sounds like a workaround which might also not work in all situations (e.g. when deploying the flow takes even longer than the delay time) and I also have situations where I emit the error anyway at a later time, so the delay would be unnecessary in this case.