class KeyNotFoundExceptionMapper implements ExceptionMapper<KeyNotFoundException> {

    @Override
    public Response toResponse(final KeyNotFoundException e) {
        LOGGER.warn(e.getMessage());
        LOGGER.debug(null, e);

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

}