use of IsNetworkFailure to handle exceptions