class ResourceAccessExceptionHandler extends AbstractExceptionHandler {

    @Override
    public void handleException(HttpServletRequest request, HttpServletResponse response, RuntimeException ex) throws ServletException {
        if (ex instanceof GatewayNotAvailableException) {
            handleGatewayNotAvailable(request, response, ex);
        } else if (ex instanceof ServiceNotAccessibleException) {
            handleServiceNotAccessible(request, response, ex);
        } else {
            throw ex;
        }
    }

    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") public  ResourceAccessExceptionHandler(MessageService messageService, ObjectMapper mapper);

}