Red HttpRequest node status in case of code 4xx and 5xx


#1

Hi folks,

When the httprequest node gets a 401 (unauthorised), the node status doesn't mention this problem. Instead it displays 'requesting'.

You can only see that there is something wrong, by having a look at the msg.statusCode or the msg.payload:

image

I find it very confusing that I don't see in the node status that something went wrong.
Personnally I would expect a red node status in case the status is 4xx (Client Error) or 5xx (Server Error).

Any suggestions, ideas about this ?

Thanks again !
Bart


#2

Bart,

not sure why your node status is stuck on requesting. The node sets that status when a message is received but it clears it when it finishes processing the response.

The node already does set the status for other errors - such as timeouts and dns failures etc. The problem with displaying the 4xx/5xx statuses is that the node sends on a message in those cases - with statusCode set properly. If we start updating status as well, then anyone using a Status node to monitor the request node will start getting extra messages from the Status node in those cases that they will already be handling out of the node's normal output.

I'm not sure how much of risk that is; but it needs considering. And as I mentioned in the other thread, its the wrong time on a Friday night to think too much about it.


#3

Did the test again, and the node status is indeed cleared automatically afterwards. Perhaps it was the wrong time on a Friday night to test such a feature ...

Never used the Status node, but I can image that - when somebody uses it to monitor the HttpRequest node - they want to be warned when e.g. an unauthorised problem occurs? Or perhaps I'm misinterpreting the usage of that Status node ...


#4

They will be notified beacause the normal msg sent by the request node will have all the details.


#5

The status tells you the status of the node itself. If the node is working then the actual return code is in the msg returned


#6

Ok thanks for explaining. Will keep that in mind...