I have a small REST application built using SpringBoot. I use a Feign Client to make requests to a similar application.
What I am trying to figure out is how to check if the application that the feign is making requests to is up. There is a path (api/online) that returns a 200 OK if the server is up. What I tried to do is make a GET request that returns a ResponseEntity and check its status code. But when the server is down I don't get any response and instead an Exception is thrown.
Is there an elegant way to do this?