addEdge should throw error on boundary nodes