I\'m using Netflix Feign to call to one operation of a Microservice A to other other operation of a Microservice B which validates a code using Spring Boot.
The operation
Write your custom exception mapper and register it. You can customize responses.
Complete example is here
public class GenericExceptionMapper implements ExceptionMapper { @Override public Response toResponse(Throwable ex) { return Response.status(500).entity(YOUR_RETURN_OBJ_HERE).build(); } }