Handling the statusCode

Hello Guys!
I'm using a Siemens clp to call an endpoint on the http request node, but I need to turn on a lamp on the clp when the statusCode is not 200.
Could anyone help how to handle a statusCode output?

Presumably statusCode is returned as msg.statusCode similar to this HTTP request:

In which case you just need a switch node

Of course how to turn on a lamp on the clp (whatever that is) may be more complex.

1 Like

In this case, can I use the dashboard to create an alarm and take the necessary measures such as a latency and check as soon as possible?

Bearing in mind that I don't know what a Siemens clp is, nor how to turn on a lamp on it...

Do you mean like a popup message on the Node-red dashboard (Which is not the same thing as the Node-red editor)?
Yes you can. There is a notification node for both the original and new dashboards.

You could also use the email node to send an email notification, or Telegram. There are third party SMS services available that you could activate too.

I do not understand.

Any nodes connected to the switch node that tests msg.statusCode will be triggered immediately.