if (persistencePackage.getEntity().isValidationFailure()) {
return new PersistenceResponse().withEntity(persistencePackage.getEntity());
}
try {
PersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
return persistenceManager.update(persistencePackage);
} catch (ServiceException e) {
//immediately throw validation exceptions without printing a stack trace
if (e instanceof ValidationException) {
throw e;
} else if (e.getCause() instanceof ValidationException) {