I had something similar initially, but my solution seems simpler doesn't it? I only need it for testing. I'm simulating a network request that fails ar first but delivers on the second try:
mockApi(fromBehaviors(error(IOException()), just(listOf("foo"))))