tryChain

infix inline fun <T> ApiResult<T>.tryChain(block: (T) -> Unit): ApiResult<T>

Call block, wrapping it in an ApiResult, and then discard the Success value, but propagate Errors.

If the result is success, continue (the result of calling block is discarded). If the result is an error, propagate it to this.

Alias for chain for calls that do not return an ApiResult already.

See also