APIGEE API proxy timeout errror not displayed correctly

I am working on a use case where I am developing an API proxy that has to timeout and display a custom error message whenever the API takes over 30 seconds to provide a response. I have set the "api.timeout" property in the HTTPProxyConnection in the proxy endpoint and set it to 30000ms. I have also configured the backend to take more than 30 seconds to provide a response. A raise fault has been added as part of the Fault Rule to raise a custom error whenever a timeout error is encountered. When I hit the API in Postman, I get a 504 gateway timeout with a "stream timeout"/"upstream request timeout" error response. I have tried calling the API with other REST clients, the browser, and via the Swagger API specs, but I faced the same issue. When I debugged the calls, it was seen that the "Error content" was getting populated with the correct custom error message that was set, but that message is not being sent to Postman. I tried reducing the "api.timeout" time to 5000ms (and other values less than 30s), in which case the custom error message was visible in Postman . The issue is present only with 30 seconds and higher. What can be done to fix this? @dino @DChiesa @anilsagar 

PS: I have already increased the request timeout value in Postman settings to much higher than 30s.

reappenreji_0-1678732101932.png

postman response:

reappenreji_2-1678732763370.png

Debug:

reappenreji_3-1678732813947.png

 

 

 

0 3 730
3 REPLIES 3

Facing the same issue. @reappenreji are u able to fix the issue.

No @shewar.

Read here

The backend service created as part of Apigee's provisioning has a timeout of 30 seconds. Is that the issue here?