Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ServiceCallout : how to exploit the response

Not applicable

Hi,

I'm using "servicecallout" so that I can call an external endpoint.

The problem is that that endpoint can return 401 (I can see it on that remote web service).

I would like to create a new step with a policy that could execute the following algorithm but I don't know how to do :

if (ServiceCallout.response.status == 401)    
	stopEverythingAndReturnError();
else    
	continue();

Is it possible ?

Regards

0 3 1,416
3 REPLIES 3