Reactive service action get http status code

Hi there!

I have a service action in module A and that is consumed by module B.

The service action consumes a rest service that returns error code 429.

In the error handling from module B I would like to receive that 429 so based on that I can trigger a specific error flow.

Is there a way to get in an exception handler the status code of a call in a service action?

Rank: #388

Hi freek, 

If I understood your question correctly, you can just develop the following steps:

1) Add an exception handler based on the service action from module A based on the rest service error response;

2) Define an output parameter on the service action that will return the same code of the rest service;

3) On module B, you can check the output of the service action and then act based on that.

Does that solve your issue?

Best Regards

Rank: #469

So it's only possible by a parameter, instead of doing something like gethttpstatus in the exeption handler in module B?

Rank: #388

Hi freek, 

I think so, because the scope that module B has, is related to the service action output parameters, not the flow within it. 

Best Regards

Rank: #187

Hi Freek,  you can check this component to check how to deal with and manipulate the status response if its necessary


if it is just receive it back the code, Paulo's answer fit you well, good luck with that


Carlos Lessa

Rank: #469

Thnx for your feedback!