Throw error if trying to run query without transaction = true while external transaction is open.