would it make sense to wrap this in a transaction so the whole thing fails if this exception (or any other..) is raised?