ServiceCallout policy returns Authentication needed when used in Response

Not applicable

Hi,

I am using a Service Callout policy in the response in the event when the response from the target is not equal to 200. I am doing this to execute some custom function when there is an error in the flow.

However, ServiceCallout policy returns an Authentication Needed error when used in the response. The same policy, when used in the request works just fine.

The URL to which the policy hits does involve some authentication. But the same ditto policy when used in the request works fine, and in the response it results in this error.

Is there anything that I am missing over here?

0 1 150
1 REPLY 1

I guess you may have Authentication header that is required for target in ServiceCallout.

This header is in scope of proxy request so works fine with service ServiceCallout in request flow.

But to use the same ServiceCallout in response flow you need to configure the ServiceCallout request explicitly. Add necessary headers and parameters in ServiceCallout request.