adapted errors on insertion (detects unique column constraint error)