Tyk will by default run the response transform regardless of the status code of the response. I would like to be able to transform the response depending on what status code is returned… Something like:
We understand that our users care about improving the product and we appreciate your suggestion. However, there hasn’t been a push for this feature request since you could achieve what you really want with the help of a response plugin. It might be a bit technical depending on your use case but it does get the job done.
Another alternative is by simply appending the response code in the body of the response and using the body transform to the check, parse and strip any unnecessary details. Of course this use case is limited but it should work for the example above.