How to disable streaming for errors at runtime.

Hi, 

I need help in a scenario where I have applied response streaming at the proxy and target endpoints respectively. 

In the target endpoints. I have set a default fault rule for my error handling scenarios where I am personalizing  my error messages based on the backend error content being returned to apigee. 

I noticed that since I have applied response.streaming.enabled= true ,  i am not able to get the backend error message in my error handling.  Also, in the response.content the message is empty in the trace. 

And whatever  mediation and scripting policies I had applied to take the response. Content(error message) . They all  come as empty. 

 

So, I wanted to know if there is any way, we could disable the streaming for runtime errors. Please help

@dchiesa1  @Former Community Member@anilsagar @apigee

0 3 146
3 REPLIES 3

Keep in mind, if streaming is enabled, you should not be attaching policies that require access to the request or response payloads as per here. You should consider the request and response payloads as unavailable.

You cannot start streaming but if there's an error then disable streaming.

Hi, 

Yes i do understand that. My requirement is such that I need those policies taht require access to response payloads especially when we encounter  errors.

"but if there's an error then disable streaming." -- this is what i intend to do as part of my logic, I am looking for a way- to disable the streaming in cases of  errors at runtime.

@dchiesa1 @DChiesa @dknezic 

Then it seems you cannot use streaming to meet these requirements.

With that said, what is your use case for using streaming?