use of IsNetworkFailure to handel exceptions