If the transaction fails, remove it from the transaction queue.