class EntityNotFoundExceptionMapper implements ExceptionMapper<EntityNotFoundException> {

    @Override
    public Response toResponse(final EntityNotFoundException ex) {
        LOGGER.warn("Entity not found: {}", ex.getMessage());
        LOGGER.debug(null, ex);

        return Response.status(Response.Status.NOT_FOUND).entity(ex.getMessage()).type(MediaType.TEXT_PLAIN).build();
    }

}