try {
entity.setProperty("names", localNames);
datastoreService.put(txn, entity);
txn.commit();
return ResultType.ADD_SUCCESS;
} catch (Exception e) {
_logger.warning("Failure to save entity with names: " + e);
if (localNames.size() >= 5000) { //python has an error about size, but we'll just artificially limit it to 1000 here