anchor.diff:  [source,java]
   ----
   Flux.just("timeout1", "unknown", "key2")
  -    .flatMap(k -> callExternalService(k))
  -    .onErrorResume(error -> { // <1>
  -        if (error instanceof TimeoutException) // <2>
  -            return getFromCache(k);
  -        else if (error instanceof UnknownKeyException)  // <3>
  -            return registerNewEntry(k, "DEFAULT");
  -        else
  -            return Flux.error(error); // <4>
  -    });
  +    .flatMap(k -> callExternalService(k)
  +        .onErrorResume(error -> { // <1>
  +            if (error instanceof TimeoutException) // <2>
  +                return getFromCache(k);
  +            else if (error instanceof UnknownKeyException)  // <3>
  +                return registerNewEntry(k, "DEFAULT");
  +            else
  +                return Flux.error(error); // <4>
  +        })
  +    );
   ----
   <1> The function allows dynamically choosing how to continue.
   <2> If the source times out, hit the local cache.
  
positive.code: Flux.just("timeout1")
      .flatMap(k -> callExternalService(k))
      .onErrorResume(original -> Flux.error(
          new BusinessException("oops, SLA exceeded", original)
      );
  ----
  
  However, there is a more straightforward way of achieving the same with `onErrorMap`:
  
negative.code: LongAdder failureStat = new LongAdder();
  Flux<String> flux =
  Flux.just("unknown")
      .flatMap(k -> callExternalService(k) // <1>
          .doOnError(e -> {
              failureStat.increment();
              log("uh oh, falling back, service failed for key " + k); // <2>
          })
          .onErrorResume(e -> getFromCache(k)) // <3>
      );
  ----
  <1> The external service call that can fail...
  <2> ...is decorated with a logging side-effect...
  