added handling for OptimisticLock exception

I've checked and this will still work with the angular scaffold solves: [FORGE-1916](https://issues.jboss.org/browse/FORGE-1916)