I'm using Tyk as gateway for some microservices in AWS using Eureka as service discovery. One problem I have is that we use autoscaling where we scale the number of microservice instances in AWS from one to many, depending on load. When there are many instance, eureka will return a json with a list of instances, like this :

In the Tyk API, it doesn't seem possible to set up something than handles both cases dynamically, since if it's set up to receive a list, it will fail when it doesn't receive one, and vice versa. Or is there something I'm missing?

If it's not possible, are there any workarounds, e.g. with endpoint designer?

For reference, the service discovery configuration I'm using for multiple instances :

In the case where there are no instances currently available (i.e. service discovery returns an empty list), is it somehow possible to make the API (that depends on the service discovery) return a 503 or something similar instead of failing outright?