dpatty
February 21, 2023, 3:26pm
1
Hi ,
We have enabled response streaming in target end point . How ever for some cases we are getting this error . -
{"fault":{"faultstring":"Body buffer overflow","detail":{"errorcode":"protocol.http.TooBigBody"}}}
Proxy is not using any policy which has access to response payload .
However we have flow hook in post target flow which is copying target response . can we use Assignmessage to copy response in flow hook - target post flow if streaming enabled ?
You are attempting to read and buffer the payload when you execute the AssignMessage policy in the Flow Hook, which is the cause of the TooBigBody error. When streaming is enabled you cannot use this policy. See the docs at https://cloud.google.com/apigee/docs/api-platform/develop/enabling-streaming#whatelseshouldiknowaboutstreaming
I recommend you set the Condition on the policy step to be skipped if streaming is enabled, like this -
<Step>
<Name>Assign-Message-Debug</Name>
<Condition>((proxy.request.streaming.enabled != "true") AND (proxy.response.streaming.enabled != "true"))</Condition>
</Step>