Using Software AG API gateway 10.11 with a customer license.
In case of non success response code from the native service(other than 2xx series response codes), i see that the response processing phase policies aren’t executed. The whole response processing phase is seen skipped as shown in tracer.
Is there a way to overcome this. What if i want to transform the payload in case of an error from the native system? What is the correct place to do so? Additionally, is it guaranteed that the response processing policies are only executed in case of 2xx series response code from the native system.
Need clarification.
If in a particular API, I have 5 resources and since Conditional Error Processing isn’t resource/method scoped, and if i put this policy at the API level, so the only way to transform the native error format into a customized one is through invocation of a flow service in Conditional error processing.
Then for the 5 resources depending on their resource path, i can set the customized error structure. Is there any other solution besides this?
This can be done, but - should n’t this be handled at native API level. Ideally API Gateway should not be handling such cases until unless it is generic error processing.
The API gateway is acting as a wrapper layer to securely expose these apis of a native target system.
Each of the native error codes are wrapped around with a custom error codes configured at the API gateway.
We don’t want to expose the target system error codes to the consumers.
Yes, this can be done but the error structure should be generalized instead of doing for each resource/method level. If this needs to be done at resource and method level it should not be done at API gateway. This is an anti pattern. Again, this can be done using conditional error processing with Integration Server or custom extension but it should not be done IMHO.
No, I wont consider it as an anti-pattern. Google Apigee API Gateway does it excellently, requiring minimum effort and is flexible enough to apply ANY policy at ANY resource level. However, I see Software AG is adamant and isn’t flexible enough to apply basic policies at the resource level.
The Error structure is/will be generalized at the gateway level and not at the native/target system.
This is wrong statement, this can be done as briefed earlier already - Conditional Error Processing. I have done this so many and suffered because of this pattern.
IMHO, it should not be done from governance standpoint.
P.S, lot of consultants who reply here are not from Software AG.
These are just consultant opinions. R&D teams should not be blamed for the community replies.