-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
Here the MICROSERVICE_GATEWAY_SERVICE_NAME env variable is set as required, but the service could not exist.
The presence of this variable could bring to use the getServiceProxy function, which url is set to the microservice-gateway (which is unreachable).
An example usecase is a project which initially contains the microservice-gateway, and at a later time it will be removed. If a service called to the microservice-gateway, it throws with some error.
Proposed feature
My proposal is to set the MICROSERVICE_GATEWAY_SERVICE_NAME env variable as not required.
If it is set (and it is not empty), the getServiceProxy remains as today (so the microservice-gateway service is called).
If, on the other hand, the env variable is not set (or is empty) and the service calls the getServiceProxy method, the service will throw a clear error. In this way, it is possible to catch the issue with the explaination on how to fix it.
If possible, it would be great if throwed error could be raised on service startup.