Help testing response from http request node

Hi, I have an http request node where I post to a local device on my network. The http request mode functions fine (device gets messages ok etc.).

My issue is testing the response of that post. If the device is powered off and so can not receive / respond to the post I want to perform some activity. So I added a switch node right after the http request node but I can’t seem to get the switch to output anything. I think I am making some incorrect assumption about what is being output from the http request node.

If I put a debug node straight after (and cause a fail scenario), I see this:

In the switch testing msg.payload I have set a condition ‘contains’ string RequestError, I have tried ‘is type’ string, I also tried checking the string is the full message as above, but the switch never fires. To my amateur eye I feel like it should be working. I read the debug message as a msg.payload was output and it was of type string so I should be able use the switch node as I described? Any clues would be greatly appreciated.

In the switch node, did you test the otherwise option?
I use node tcp and the only way to catch errors is through node catch.

Hey. Seems I was being stupid and the counter node I was feeding into wasn’t set up correctly. It was working all along :confused: