fix error reporting for getNetworkInfo()