Not able to read 400 Bad request response using call REST action.

Hi Experts, I am developing a banking application where response is in JSON format. These response are HTTP response but they made a custom response. Like  for 400 Bad Request : if something is wrong functionally. like account number doesn't exist or low balance something similar. 201 for : success response. etc..   I have used call REST action for using their APIs. this action receives the response and process it if I receives 201 response, but it fail and give "An error occurred, please contact your system administrator." error when it receives the response in 400 series . This 400 response I can see in console. But my call REST action is not able to read it and quits there only. I am trying to read the response but debugger not moving after call REST action.   Could you please help me in that. Attaching my call REST action screen shots for your reference.            
1 answers

Hi Vijay,


Can you share a screenshot of the microflow? I think when you enable error handler on the REST activity, you should be able to configure a flow that handles the occurence of non 200-results.


Then the $latestHttpResponse can be used in the handling logic there, like this:



Good luck!


P.S. I cannot resist to mention that the custom implementation of ClientId and ClientSecret looks a bit weird for me, these terminology suggests that you should obtain a (short-living) access token at the Identity Provider instead of sending in a custom Header field to the Service Provider. Anyways: maybe wise to ask some questions about that.