How can we identify if the response we are getting from tyk gateway is coming from Upstream and not from TYK itself or vice versa.
For example: if there is any 429 error, how do we know if this is coming from backend and not from TYK.
Is there any tyk response header by which we can identify it or any middleware where it can be ingested.
Note: Upstream is not in our control to set any additional headers.
You can use response plugin, as it have the upstream response details that you want to check or modify, other than that you need to compare messages coming from your upstream and tyk for example if 429 tyk have message like Rate limit exceeded and tyk gateway put response headers like X-Ratelimit-Limit etc for every requests.
Checking message from response may not be possible as we can not check messages for all http status codes.
Can you confirm if we add any response plugin in API, does it ensures that it will only executes once response is received from Upstream or it will be executed for tyk level responses as well.