throw new WebApplicationException(BAD_REQUEST);
}
Entityhub entityhub = ContextHelper.getServiceFromContext(Entityhub.class, servletContext);
Entity entity;
try {
entity = entityhub.lookupLocalEntity(reference, create);
} catch (EntityhubException e) {
throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
}
if (entity == null) {
return Response.status(Status.NOT_FOUND).entity("No symbol found for '" + reference + "'.")