Serial In / Serial request node issue - Error handling

Hi Team
Is there any way that we can catch the uncaught exceptions from serial in or serial request node
I have tried using the status node.. but only seeing connected(OK) and timeout as (timeout).
Is there any way or settings wrapper that I can catch the uncaught exception like (COM2: Access denied , COM2 : File not found) such errors from Java (backend)

In UI, I am able to catch them using loghandler inside the nodered Settings

Does the catch node not catch them ?

Nope, the Catch node is not able to identify those errors as they are called as uncaught exceptions.

Do you mean that they crash node red?

Can you stop node-red and then restart it in a terminal and post the log from startup to the error please.

The catch node only gets triggered when node.error() is called with a message as second parameter, meaning they had to be part of a running flow. If the serial port can't be set up in the first place, you will only see error messages in the log.

Correct me, if I'm wrong... I did a quick sweep over the code, error handling looks fine, but those are logged as errors only. Unfortunately, you can't catch them in a flow. :sweat_smile:

1 Like

When do those errors occur? I suspect they occur before the flows are started, so it is therefore not possible to catch them within a flow.

yes @kuema , what you posted is correct we are seeing those error msgs in the logs in debug mode.
But we are not able to catch them through the backend. Need to check whether any other way to find those logs from java.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.