Fixed ambiguous error handling in get_topology