function isNetworkFailure() {
  const chanceOfFailure = 0;  // 0..1
  return Math.random() < chanceOfFailure;
}
Randomly simulate network failures.
It is useful to enable this during development to make sure our app works
in real-world conditions.