use session.rollback() when catching IntegrityError