class AutoDiscoveryDisabledExceptionMapper implements ExceptionMapper<AutoDiscoveryDisabledException> {

    @Override
    public Response toResponse(final AutoDiscoveryDisabledException exception) {
        LOGGER.debug(null, exception);

        return Response.status(Response.Status.FORBIDDEN)
                .entity(exception.getMessage())
                .type(MediaType.TEXT_PLAIN)
                .build();
    }

}