Example:
Uni<String> request = makeSomeNetworkRequest(params);
request.ifNoItem().after(ofMillis(100))
.failWith(() -> new TooSlowException("💥"))
.onFailure(IOException.class).recoverWithItem(fail -> "📦")
.subscribe().with(
item -> log("👍 " + item),
err -> log(err.getMessage())
);
Last modified 16 December 2024