'How to handle uncaught expception in proxy/registry service in node js?

We have multiple microservice projects and one proxy/service registry which all services apis register in this service. now we want to catch uncaught expections. Since all services share registry service, we were thinking maybe this could be done in there, since all services register at startup. Is it possible to catch in the registry service if yes how can we ? I am thinking when we are forwarding apis from registry service to another service can we catch in there?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source