vertx / io.vertx.reactivex.circuitbreaker / CircuitBreaker / fallback

fallback

open fun <T : Any> fallback(handler: Function<Throwable, T>): CircuitBreaker

Sets a default invoked when the bridge is open to handle the "request", or on failure if io.vertx.circuitbreaker.CircuitBreakerOptions is enabled.

The function gets the exception as parameter and returns the fallback result.

Parameters

handler - the handler

Return
the current io.vertx.reactivex.circuitbreaker.CircuitBreaker