mapFailure

abstract suspend fun mapFailure(transform: suspend (exception: TerminalException) -> T): DurableFuture<T>

Map the failure result of this DurableFuture.

Return

a new DurableFuture with the mapped result, when completed

Parameters

transform

the mapper to execute if this DurableFuture completes with failure. The mapper can throw a dev.restate.sdk.common.TerminalException, thus failing the returned DurableFuture.