HTTP response from endpoint

Mag_ Tomer Harp
Giga Expert

Hello,

 

If there are 3 systems connected using HTTP(S)  like:

A-->B-->C

 

The problem is that if A received 200 from B , and B receive an HTTP error from C,  A will not be aware to it (This how HTTP works).

I know that there is a way to receive the HTTP response from the end point (so A will be aware to an error occur between B and C) but I forgot how it called.

 

 

 

6 REPLIES 6

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @Mag_ Tomer Harp ,

You can use the below line of code

var httpStatus = response.getStatusCode();

also please refer below docs link

https://developer.servicenow.com/dev.do#!/learn/learning-plans/rome/technology_partner_program_1/app...

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

If I add it in A I will not give me the status from C.