Merge "Improve error message when testing network factory"