Ignore Target response and send the fixed self created response to proxy

Not applicable

I need to send the fixed response and ignore response from target. So basically if I get the request from proxy I will send fixed response acknowledging the request and then request send to target . Even the target sends back success or error I want to ignore that response, Is that possible?

Thanks

0 4 442
4 REPLIES 4

Not applicable

@Subhash

So, the think is you want to send your own response rather then sending the actual response coming from backend.?

Yes, That is possible you can do that with Assign message where you can create/customize response and send back to proxy.

Thanks for the quik reply..

I tried and able to do that but when I get error from target I am not able to modify the response from Assign Message . Is there any way to send the same response even if it errors or success.

@Subhash

This is the way apigee flow works.

The things is when the response is success you are in normal flow, So u have used assign message to generate the response and send back to the source.

But when you get error from target , The actual flow move to error flow where you can't modify it.

Apply fault handling method to catch the errors and based on that generate a response and send back.

Hi @Subhash

I have a similar requirement If I get 4XX or 5XX status code from the target then I have to send some static response back to the consumer. can you help me out what you did to resolve the issue?

Thanks